CVE-2026-28684

6.6 MEDIUM
Published: April 20, 2026 Modified: April 27, 2026
View on NVD

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.

AI Explanation

Get an AI-powered plain-language explanation of this vulnerability and remediation steps.

Login to generate AI explanation

CVSS v3.x Details

0.0 Low Medium High Critical 10.0
Vector String
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H

References to Advisories, Solutions, and Tools

Patch Vendor Advisory Exploit Third Party Advisory
https://github.com/theskumar/python-dotenv/releases/tag/v1.2.2
Source: security-advisories@github.com
Release Notes
https://github.com/theskumar/python-dotenv/security/advisories/GHSA-mf9w-mj56-hr94
Source: security-advisories@github.com
Exploit Patch Vendor Advisory
https://github.com/theskumar/python-dotenv/security/advisories/GHSA-mf9w-mj56-hr94
Source: 134c704f-9b21-4f2e-91b3-4a467353bcc0
Exploit Patch Vendor Advisory

4 reference(s) from NVD

Quick Stats

CVSS v3 Score
6.6 / 10.0
EPSS (Exploit Probability)
0.0%
0th percentile
Exploitation Status
Not in CISA KEV

Weaknesses (CWE)

Affected Vendors

saurabh-kumar