CVE-2026-28684
published medium CVSS 3.1 · 6.6python-dotenv: Symlink following in set_key allows arbitrary file overwrite via cross-device rename fallback
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| theskumar | — | python-dotenv< 1.2.2 | Affected | Not stated | GitHub_M |
| SUSE / openSUSE | SLE-15-SP7 | python311-python-dotenvnoarch | Advisory build | 1.0.0-150400.9.6.1 | SUSE-SU-2026:2724-1 |
| SUSE / openSUSE | SLE-16 | python313-python-dotenvnoarch | Advisory build | 1.1.0-160000.3.1 | SUSE-SU-2026:22118-1 |
| SUSE / openSUSE | SLE-3-SP7 | python311-python-dotenvnoarch | Advisory build | 1.0.0-150400.9.6.1 | SUSE-SU-2026:2724-1 |
| SUSE / openSUSE | openSUSE-Leap-16.0 | python313-python-dotenvnoarch | Advisory build | 1.1.0-160000.3.1 | OPENSUSE-SU-2026:20952-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-pydantic-settingsaarch64 | Advisory build | 2.16.3-1.1 | OPENSUSE-SU-2026:12571-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-pydantic-settingsppc64le | Advisory build | 2.16.3-1.1 | OPENSUSE-SU-2026:12571-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-pydantic-settingss390x | Advisory build | 2.16.3-1.1 | OPENSUSE-SU-2026:12571-1 |
Show 5 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| SUSE / openSUSE | openSUSE-Tumbleweed | python313-pydantic-settingsx86_64 | Advisory build | 2.16.3-1.1 | OPENSUSE-SU-2026:12571-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-pydantic-settingsaarch64 | Advisory build | 2.16.3-1.1 | OPENSUSE-SU-2026:12571-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-pydantic-settingsppc64le | Advisory build | 2.16.3-1.1 | OPENSUSE-SU-2026:12571-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-pydantic-settingss390x | Advisory build | 2.16.3-1.1 | OPENSUSE-SU-2026:12571-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | python314-pydantic-settingsx86_64 | Advisory build | 2.16.3-1.1 | OPENSUSE-SU-2026:12571-1 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 6.6 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| theskumar | python-dotenv | < 1.2.2 (affected) | GitHub_M · cna |
Weaknesses
2- CWE-59 CWE-59: Improper Link Resolution Before File Access ('Link Following')
- CWE-61 CWE-61: UNIX Symbolic Link (Symlink) Following
References
3Provider assertions
2GitHub_M · cna
python-dotenv: Symlink following in set_key allows arbitrary file overwrite via cross-device rename fallback
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 0a0c194c8beb56505d872e1c12e806d99d80cc66b1c1119c90ac747d9937dd49
- Ingested
- 23 Sep 2026, 09:08:14 UTC
- Source record
- Official CVE record