File Overwrite Vulnerability in python-dotenv Affects Users
CVE-2026-28684
6.6MEDIUM
What is CVE-2026-28684?
The python-dotenv library, which is used to read key-value pairs from a .env file and set them as environment variables, has a vulnerability prior to version 1.2.2. The methods set_key() and unset_key() are susceptible to following symbolic links when rewriting .env files. This flaw permits local attackers to exploit crafted symlinks to overwrite arbitrary files, particularly if the system triggers a cross-device rename fallback. Users are strongly advised to upgrade to version 1.2.2 or employ the manual patch as a workaround.
Affected Version(s)
python-dotenv < 1.2.2
