CVE-2026-28684: python-dotenv reads key-value pairs from a .env file and can set them as environment variables
CVE-2026-28684 is a medium-severity flaw (CVSS 6.6) affecting python-dotenv. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.
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.
Why this priority
- Public exploit reference
A fixed release or distro patch exists.
Last updated 2026-10-26 · Sources: CVE Program, NVD, CISA KEV, EPSS and vendor advisories · How we score
Am I affected?
Timeline
- Published CVE record published
- Updated Record last modified
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.
Quick answers
How do I fix CVE-2026-28684?
python-dotenv: upgrade to 1.2.2. Exact commands for each OS are on this page.
Is CVE-2026-28684 being exploited?
CVE-2026-28684 is not on the CISA Known Exploited Vulnerabilities list at the time of the last update. Check again, as this can change.
What does CVE-2026-28684 affect?
CVE-2026-28684 affects python-dotenv. Severity is medium (CVSS 6.6). 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 attac
How urgent is CVE-2026-28684?
Priority 32/100. Public exploit reference