CVE-2026-28684python-dotenv: Symlink following in set_key allows arbitrary file overwrite via cross-device rename fallback
- 6.6MediumCVSS base score
- 0.25%Exploitation in 30 daysEPSS · top 83% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- YesPublic exploitsa reference or SSVC says so
Description
python-dotenv reads key-value pairs from a .env file and can set them as environment variables. Prior to version 1.2.2, `set_key()` and `unset_key()` in python-dotenv follow symbolic links when rewriting `.env` files, allowing a local attacker to overwrite arbitrary files via a crafted symlink when a cross-device rename fallback is triggered. Users should upgrade to v.1.2.2 or, as a workaround, apply the patch manually.
Public exploit
An exploit or proof of concept is public: anyone can try it against an unpatched system. A reference of the record is tagged as an exploit. CISA's SSVC rates its exploitation: a proof of concept is public.
Show the exploits1
References tagged exploit1 reference
- https://github.com/theskumar/python-dotenv/security/advisories/GHSA-mf9w-mj56-hr94 (opens in a new tab)x_refsource_CONFIRMexploit
Timeline
ID reserved
By GitHub_M
- 49 days later
· 49 days later
Published
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Medium6.6 | CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H |
| NVDNVD · Analyzed | 3.1 | Medium6.6 | CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H |
- EPSS (exploitation in 30 days)
- 0.25% · top 83% of all CVEs (14 Nov 2026)
- CISA SSVC
- Exploitation: poc · Automatable: no · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 6.6.
Affected products
- affected < 1.2.2
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- PyPIpython-dotenvGHSA-mf9w-mj56-hr94 (opens in a new tab)
References
References3
- https://github.com/theskumar/python-dotenv/security/advisories/GHSA-mf9w-mj56-hr94 (opens in a new tab)x_refsource_CONFIRMexploit
- https://github.com/theskumar/python-dotenv/commit/790c5c02991100aa1bf41ee5330aca75edc51311 (opens in a new tab)x_refsource_MISC
- https://github.com/theskumar/python-dotenv/releases/tag/v1.2.2 (opens in a new tab)x_refsource_MISC
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2026-23901 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-mf9w-mj56-hr94 (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2026-28684)Record last updated .