Vulnerability in Saurabh-Kumar Python-Dotenv
CVE-2026-28684
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.
Published · last modified .
CVSS v3 metric
CVSS v3 base score 6.6 (Medium). Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H.
EPSS exploit prediction
EPSS: 0.002 (7.4th percentile), scored .
Very low probability of exploitation in the next 30 days; routine patching cadence is appropriate. 7th percentile — 7.4% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.003 · newest: 0.002 · change: -0.001
Affected products
- Saurabh-Kumar Python-Dotenv
- Theskumar Python-Dotenv — versions < 1.2.2
Weakness classification (CWE)
References
- github.com/theskumar/python-dotenv/security/advisories/GHSA-mf9w-mj56-hr94 (Exploit, Patch, Vendor Advisory)
- github.com/theskumar/python-dotenv/commit/790c5c02991100aa1bf41ee5330aca75edc51… (Patch)
- github.com/theskumar/python-dotenv/releases/tag/v1.2.2 (Release Notes)
Frequently asked questions
- What is CVE-2026-28684?
- CVE-2026-28684 is a medium-severity vulnerability in Saurabh-Kumar Python-Dotenv, classified under Improper Link Resolution Before File Access. CVSS score: 6.6/10. Published 2026-04-20.
- How severe is CVE-2026-28684?
- Medium severity. CVSS v3 base score is 6.6 out of 10.