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.
Metrics
Affected Vendors & Products
References
History
Mon, 20 Apr 2026 18:15:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| Metrics |
ssvc
|
Mon, 20 Apr 2026 16:45:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| 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. | |
| Title | python-dotenv: Symlink following in set_key allows arbitrary file overwrite via cross-device rename fallback | |
| Weaknesses | CWE-59 CWE-61 |
|
| References |
| |
| Metrics |
cvssV3_1
|
Status: PUBLISHED
Assigner: GitHub_M
Published: 2026-04-20T16:25:12.302Z
Updated: 2026-04-20T17:43:09.477Z
Reserved: 2026-03-02T21:43:19.927Z
Link: CVE-2026-28684
Updated: 2026-04-20T17:42:50.526Z
Status : Awaiting Analysis
Published: 2026-04-20T17:16:33.087
Modified: 2026-04-20T19:03:07.607
Link: CVE-2026-28684
No data.