{"id":"CVE-2026-28684","summary":"python-dotenv: Symlink following in set_key allows arbitrary file overwrite via cross-device rename fallback","details":"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.","aliases":["GHSA-mf9w-mj56-hr94"],"modified":"2026-06-18T03:55:49.812690800Z","published":"2026-04-20T16:25:12.302Z","related":["CGA-cj7r-vvx6-gqgj","SUSE-SU-2026:22118-1","openSUSE-SU-2026:20952-1"],"database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-59","CWE-61"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/28xxx/CVE-2026-28684.json"},"references":[{"type":"WEB","url":"https://github.com/theskumar/python-dotenv/releases/tag/v1.2.2"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/28xxx/CVE-2026-28684.json"},{"type":"ADVISORY","url":"https://github.com/theskumar/python-dotenv/security/advisories/GHSA-mf9w-mj56-hr94"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-28684"},{"type":"FIX","url":"https://github.com/theskumar/python-dotenv/commit/790c5c02991100aa1bf41ee5330aca75edc51311"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/theskumar/python-dotenv","events":[{"introduced":"0"},{"fixed":"36004e0e34be7665ff2b11a8a4005144f76f176d"},{"fixed":"790c5c02991100aa1bf41ee5330aca75edc51311"}],"database_specific":{"source":["CPE_RANGE","REFERENCES"],"extracted_events":[{"introduced":"0"},{"fixed":"1.2.2"}],"cpe":"cpe:2.3:a:saurabh-kumar:python-dotenv:*:*:*:*:*:python:*:*"}}],"versions":["v1.2.1","v1.2.0","v1.1.1","v1.1.0","v1.0.1","v1.0.0","v0.21.1","v0.21.0","v0.20.0","v0.19.2","v0.19.1","v0.19.0","v0.18.0","v0.17.1","v0.17.0","v0.16.0","v0.15.0","v0.14.0","v0.13.0","v0.12.0","v0.11.0","v0.10.5","v0.10.4","v0.10.3","v0.10.2","v0.10.1","v0.10.0","v0.9.1","v0.9.0","v0.8.2","v0.8.1","v0.8.0","v0.7.1","v0.7.0","v0.6.5","v0.6.4","v0.6.3","v0.6.2","v0.6.1","v0.6.0","v0.5.1","v0.5.0","v0.4.0","v0.3.0","v0.2.0","v0.1.5","v0.1.3","v0.1.2","v0.1.1"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-28684.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H"}]}