{"cve":"CVE-2026-28684","nvd":{"published":"2026-04-20T17:16:33.087","modified":"2026-10-26T21:10:00.170","status":"Analyzed","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_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H","score":6.6},"cwes":["CWE-59","CWE-61"],"references":["https://github.com/theskumar/python-dotenv/commit/790c5c02991100aa1bf41ee5330aca75edc51311","https://github.com/theskumar/python-dotenv/releases/tag/v1.2.2","https://github.com/theskumar/python-dotenv/security/advisories/GHSA-mf9w-mj56-hr94","https://github.com/theskumar/python-dotenv/security/advisories/GHSA-mf9w-mj56-hr94"],"products":["saurabh-kumar:python-dotenv"],"source":"nvd","synced_at":"2026-10-26T21:38:48.864438205+00:00"},"epss":{"cve":"CVE-2026-28684","score":0.00252,"percentile":0.16569,"date":"2026-10-26"},"kev":null,"osv":[{"id":"GHSA-mf9w-mj56-hr94","url":"https://osv.dev/vulnerability/GHSA-mf9w-mj56-hr94","summary":"python-dotenv: Symlink following in set_key allows arbitrary file overwrite via cross-device rename fallback","modified":"2026-09-10T03:51:02.363430883Z","packages":[{"ecosystem":"PyPI","name":"python-dotenv","purl":"pkg:pypi/python-dotenv","ranges":["<1.2.2"],"fixed":["1.2.2"]}]},{"id":"PYSEC-2026-2270","url":"https://osv.dev/vulnerability/PYSEC-2026-2270","summary":"","modified":"2026-07-13T07:15:44.015809613Z","packages":[{"ecosystem":"PyPI","name":"python-dotenv","purl":"pkg:pypi/python-dotenv","ranges":["<1.2.2"],"fixed":["1.2.2"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}