CVE-2026-28684: python-dotenv reads key-value pairs from a .env file and can set them as environment variables
Affects python-dotenvSource GCVE Database
Not known to be exploited · CVSS 6.6 Medium.
Data as of 24 Nov 2026, 21:15 UTC
- EPSS
- 0.2% chance of exploitation in 30 days – higher than 18% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 20 Apr 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 24 Nov 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Ubuntu 26.10python-dotenvpkg:deb/ubuntu/python-dotenv?arch=source&distro=stonkingOther threats | Affected
| Fixed in– |
Ubuntu 26.04 LTSpython-dotenvpkg:deb/ubuntu/python-dotenv?arch=source&distro=resoluteOther threats | Affected
| Fixed in– |
Ubuntu 25.10python-dotenvpkg:deb/ubuntu/python-dotenv?arch=source&distro=questingOther threats | Affected
| Fixed in– |
Ubuntu 24.04 LTSpython-dotenvpkg:deb/ubuntu/python-dotenv?arch=source&distro=nobleOther threats | Affected
| Fixed in– |
Ubuntu 22.04 LTSpython-dotenvpkg:deb/ubuntu/python-dotenv?arch=source&distro=jammyOther threats | Affected
| Fixed in– |
Ubuntu 20.04 LTSpython-dotenvpkg:deb/ubuntu/python-dotenv?arch=source&distro=focalOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
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.