Vulnerability 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.
CVSS Score
MEDIUM
Affected Products
| Vendor | Product | Versions |
|---|---|---|
| Saurabh-Kumar | Python-Dotenv | < 1.2.2 |
Related Weaknesses (CWE)
References
- https://github.com/theskumar/python-dotenv/commit/790c5c02991100aa1bf41ee5330acaPatch
- https://github.com/theskumar/python-dotenv/releases/tag/v1.2.2Release Notes
- https://github.com/theskumar/python-dotenv/security/advisories/GHSA-mf9w-mj56-hrExploitPatchVendor Advisory
- https://github.com/theskumar/python-dotenv/security/advisories/GHSA-mf9w-mj56-hrExploitPatchVendor Advisory
FAQ
What is CVE-2026-28684?
CVE-2026-28684 is a vulnerability with a CVSS score of 6.6 (MEDIUM). 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 rewrit...
How severe is CVE-2026-28684?
CVE-2026-28684 has been rated MEDIUM with a CVSS base score of 6.6/10. Review the CVSS metrics above for detailed severity breakdown.
Is there a patch for CVE-2026-28684?
Check the references section above for vendor advisories and patch information. Affected products include: Saurabh-Kumar Python-Dotenv.