# CVE-2026-28684

> Vulnerability · severity: **MEDIUM** (CVSS 6.6).

## 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.

## Key facts

- **CVE ID:** CVE-2026-28684
- **Published:** 2026-04-20
- **CVSS severity:** MEDIUM
- **CVSS base score:** 6.6
- **CWE codes:** CWE-59, CWE-61

## Affected products

- `saurabh-kumar:python-dotenv`

## Primary sources

- NIST NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-28684

## Citation

> AI Analytics. CVE-2026-28684. Retrieved 2026-07-17 from https://api.ai-analytics.org/cve/CVE-2026-28684. Derived from NIST NVD. Licensed CC0.

---

*[Dataset catalog](https://api.ai-analytics.org/datasets/) · [AI Analytics](https://api.ai-analytics.org/) · CC0 1.0*