Skip to main content
VulnerabilityPublished Updated

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

0
Compare
Authoritative record:CVE-2026-28684· Medium 6.6

Not known to be exploited · CVSS 6.6 Medium.

Data as of 24 Nov 2026, 21:15 UTC

CVSS 3.1 base score
6.6Medium
How severe the flaw is on the 0–10 CVSS scale.
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:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 20 Apr 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
Ubuntu 26.10python-dotenvpkg:deb/ubuntu/python-dotenv?arch=source&distro=stonkingOther threatsAffected
  • =1.0.1-1build1
  • =1.2.1-2
Fixed in–
Ubuntu 26.04 LTSpython-dotenvpkg:deb/ubuntu/python-dotenv?arch=source&distro=resoluteOther threatsAffected
  • =1.0.1-1
  • =1.0.1-1build1
Fixed in–
Ubuntu 25.10python-dotenvpkg:deb/ubuntu/python-dotenv?arch=source&distro=questingOther threatsAffected
  • =1.0.1-1
Fixed in–
Ubuntu 24.04 LTSpython-dotenvpkg:deb/ubuntu/python-dotenv?arch=source&distro=nobleOther threatsAffected
  • =1.0.0-1
  • =1.0.1-1
Fixed in–
Ubuntu 22.04 LTSpython-dotenvpkg:deb/ubuntu/python-dotenv?arch=source&distro=jammyOther threatsAffected
  • =0.15.0-1
  • =0.19.0-1
  • =0.19.2-1
Fixed in–
Ubuntu 20.04 LTSpython-dotenvpkg:deb/ubuntu/python-dotenv?arch=source&distro=focalOther threatsAffected
  • =0.9.1-1
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.

References

Community reviews

Loading reviews…