File Overwrite Vulnerability in python-dotenv Affects Users
CVE-2026-28684

6.6MEDIUM

Key Information:

Vendor

Theskumar

Vendor
CVE Published:
20 April 2026

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

References

CVSS V3.1

Score:
6.6
Severity:
MEDIUM
Confidentiality:
None
Integrity:
High
Availability:
None
Attack Vector:
Local
Attack Complexity:
Low
Privileges Required:
Low
User Interaction:
Required
Scope:
Unchanged

Timeline

  • Vulnerability published

  • Vulnerability Reserved

.