python-dotenv — security advisory
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.
- Products
- python-dotenv
- Affected versions
- 0.21.0-1, 1.0.0-1, 1.0.1-1, 1.2.1-1, 1.2.1-2
- Fixed versions
- Not specified
- CVEs
- CVE-2026-28684
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 17:50 UTC · Revision 2
Source evidence
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.
osv:DEBIAN-CVE-2026-28684
python-dotenv
Fixed versions: Not specified
python-dotenv
Fixed versions: Not specified
python-dotenv
Fixed versions: Not specified
Complete source record
{
"id": "d4b0bda20de93b283bfc10b91ab453832010e6f6f8b7075dc715ac92aa96e9c5",
"url": "https://osv.dev/vulnerability/DEBIAN-CVE-2026-28684",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "DEBIAN-CVE-2026-28684",
"summary": "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.",
"evidence": "osv:DEBIAN-CVE-2026-28684",
"products": [
{
"name": {
"value": "python-dotenv",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "0.21.0-1",
"evidence": "/affected/0/versions"
},
{
"value": "1.0.0-1",
"evidence": "/affected/0/versions"
},
{
"value": "1.0.1-1",
"evidence": "/affected/0/versions"
},
{
"value": "1.2.1-1",
"evidence": "/affected/0/versions"
},
{
"value": "1.2.1-2",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "python-dotenv",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.0.1-1",
"evidence": "/affected/1/versions"
},
{
"value": "1.2.1-1",
"evidence": "/affected/1/versions"
},
{
"value": "1.2.1-2",
"evidence": "/affected/1/versions"
}
]
},
{
"name": {
"value": "python-dotenv",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.0.1-1",
"evidence": "/affected/2/versions"
},
{
"value": "1.2.1-1",
"evidence": "/affected/2/versions"
},
{
"value": "1.2.1-2",
"evidence": "/affected/2/versions"
}
]
}
],
"severity": "medium",
"structured": {
"id": "DEBIAN-CVE-2026-28684",
"aliases": [
"DEBIAN-CVE-2026-28684"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "python-dotenv",
"purl": "pkg:deb/debian/python-dotenv?arch=source&distro=bookworm",
"ecosystem": "Debian:12"
},
"versions": [
"0.21.0-1",
"1.0.0-1",
"1.0.1-1",
"1.2.1-1",
"1.2.1-2"
],
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-28684.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "python-dotenv",
"purl": "pkg:deb/debian/python-dotenv?arch=source&distro=trixie",
"ecosystem": "Debian:13"
},
"versions": [
"1.0.1-1",
"1.2.1-1",
"1.2.1-2"
],
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-28684.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "python-dotenv",
"purl": "pkg:deb/debian/python-dotenv?arch=source&distro=forky",
"ecosystem": "Debian:14"
},
"versions": [
"1.0.1-1",
"1.2.1-1",
"1.2.1-2"
],
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2026-28684.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
}
],
"modified": "2026-10-27T09:47:43.401298023Z",
"provider": "osv",
"upstream": [
"CVE-2026-28684"
],
"references": [
"https://security-tracker.debian.org/tracker/CVE-2026-28684"
]
},
"related_cves": [
{
"value": "CVE-2026-28684",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 461357,
"published_at": "2026-04-20T17:16:33.087+00:00"
}