{"id":"CVE-2026-28684","aliases":["GHSA-mf9w-mj56-hr94","PYSEC-2026-2270"],"url":"https://o3.security/vulnerability/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.","published":"2026-04-20T16:25:12.302Z","modified":"2026-07-15T01:49:00.698690296Z","cvss":{"score":6.6,"severity":"MEDIUM","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H"},"epss":{"score":0.00258,"percentile":0.17347,"asOf":"2026-08-07"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"PyPI","name":"python-dotenv","fixedVersion":"1.2.2"}],"fix":{"url":"https://github.com/theskumar/python-dotenv/commit/790c5c02991100aa1bf41ee5330aca75edc51311","label":"theskumar/python-dotenv@790c5c0"},"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"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-07-15T01:49:00.698690296Z"}}