CVE-2026-28684

Source
https://cve.org/CVERecord?id=CVE-2026-28684
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-28684.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2026-28684
Aliases
Downstream
Related
Published
2026-04-20T16:25:12.302Z
Modified
2026-06-18T03:55:49.812690800Z
Severity
  • 6.6 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H CVSS Calculator
Summary
python-dotenv: Symlink following in set_key allows arbitrary file overwrite via cross-device rename fallback
Details

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.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/28xxx/CVE-2026-28684.json",
    "cwe_ids": [
        "CWE-59",
        "CWE-61"
    ],
    "cna_assigner": "GitHub_M"
}
References

Affected packages

Git / github.com/theskumar/python-dotenv

Affected ranges

Type
GIT
Repo
https://github.com/theskumar/python-dotenv
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Fixed
Database specific
{
    "cpe": "cpe:2.3:a:saurabh-kumar:python-dotenv:*:*:*:*:*:python:*:*",
    "source": [
        "CPE_RANGE",
        "REFERENCES"
    ],
    "extracted_events": [
        {
            "introduced": "0"
        },
        {
            "fixed": "1.2.2"
        }
    ]
}

Affected versions

v0.*
v0.1.1
v0.1.2
v0.1.3
v0.1.5
v0.10.0
v0.10.1
v0.10.2
v0.10.3
v0.10.4
v0.10.5
v0.11.0
v0.12.0
v0.13.0
v0.14.0
v0.15.0
v0.16.0
v0.17.0
v0.17.1
v0.18.0
v0.19.0
v0.19.1
v0.19.2
v0.2.0
v0.20.0
v0.21.0
v0.21.1
v0.3.0
v0.4.0
v0.5.0
v0.5.1
v0.6.0
v0.6.1
v0.6.2
v0.6.3
v0.6.4
v0.6.5
v0.7.0
v0.7.1
v0.8.0
v0.8.1
v0.8.2
v0.9.0
v0.9.1
v1.*
v1.0.0
v1.0.1
v1.1.0
v1.1.1
v1.2.0
v1.2.1

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-28684.json"