CVE-2026-28684 | python-dotenv: Symlink following in set_key allows arbitrary file overwrite via cross-device rename fallback

Exp

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.

Published: 2026-04-20 Last update: 2026-04-27 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2026-28684 is rated Exploit Available (50/100): CVSS Medium severity, with low exploitation likelihood (EPSS 0.02%). Core evidence: 1 public exploit reference(s) are indexed (Exploit-DB). Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Public exploit references (Exploit-DB) for CVE-2026-28684

EDB-ID Source Kind Published Link
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2026-28684

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-04-21 0.02%

Full EPSS history (1 record total)

Common vulnerability scoring system (CVSS) metrics for CVE-2026-28684

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
6.6 3.1 MEDIUM
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.3 5.2 [email protected]

Weakness enumeration for CVE-2026-28684

GitHub Security Advisory for CVE-2026-28684

GHSA-mf9w-mj56-hr94 · Severity: medium · Ecosystem: pip — python-dotenv: Symlink following in set_key allows arbitrary file overwrite via cross-device rename fallback

OS Trackers for CVE-2026-28684

vendor priority summary link
debian not yet assigned CVE-2026-28684 not yet assigned priority: Debian including 1 source packages (python-dotenv), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): open 5. https://security-tracker.debian.org/tracker/CVE-2026-28684
suse medium CVE-2026-28684 severity moderate: SUSE including 1 source package names (python311-python-dotenv-1.0.0-150400.9.6.1), 2 product×package rows across 2 product lines (SUSE Linux Enterprise Module for Python 3 15 SP7, SUSE Linux Enterprise Server 15 SP4-TERADATA): First Fixed 2. https://www.suse.com/security/cve/CVE-2026-28684/
ubuntu medium CVE-2026-28684 medium priority: Ubuntu including 1 source packages (python-dotenv), 7 status rows across 7 suites (bionic, focal, jammy, noble, questing, resolute, upstream): needs-triage 7. https://ubuntu.com/security/CVE-2026-28684

Affected software / configurations for CVE-2026-28684

Vendor Product Version Raw CPE
saurabh-kumar python-dotenv < 1.2.2 cpe:2.3:a:saurabh-kumar:python-dotenv:*:*:*:*:*:python:*:*

References for CVE-2026-28684

cvelogic Threat Intelligence