CVE-2026-28684Saurabh-kumar Python-dotenv
Medium 6.6
Follow: this CVE · Saurabh-kumar · Saurabh-kumar Python-dotenv We alert you by email or Slack (account required).
- Priority
- 40
- CVSS 3.1
- 6.6
- EPSS
- —
- Auth required
- Yes
- Published
- Apr 20, 2026
- Updated
- Oct 26, 2026
- Category
- Application · Cross-platform
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: no · Technical impact: total
- Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H
What happens
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.
What to do
- Apply the vendor's security update for Python-dotenv.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | python-dotenv |
< 1.2.2 |
1.2.2 |
pip install "python-dotenv>=1.2.2" |
| PyPI | python-dotenv |
< 1.2.2 |
1.2.2 |
pip install "python-dotenv>=1.2.2" |
Per OSV / GitHub Advisories (GHSA-mf9w-mj56-hr94, PYSEC-2026-2270). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| saurabh-kumar | python-dotenv | < 1.2.2 |
Official advisories
- python313-pydantic-settings-2.16.3-1.1 on GA media · SUSE · openSUSE-SU-2026:12571-1 · Nov 16, 2026 Medium
- Security update for python-python-dotenv · SUSE · SUSE-SU-2026:2724-1 · Jul 1, 2026 Medium
- Security update for python-python-dotenv · SUSE · openSUSE-SU-2026:20952-1 · Jun 11, 2026 Medium
Also: SUSE (+1)
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- github.com Release Notes
- github.com Exploit Patch Vendor Advisory