python-dotenv: Symlink following in set_key allows arbitrary file overwrite via cross-device rename fallback (theskumar python-dotenv)
En bref
- Source
- NVD
- EPSS
- EPSS 0.25 % · centile 17 ()
- État
- PUBLISHED
- Publiée
- Mise à jour
- Attribuée par
- GitHub_M
- Statut NVD
- Analyzed
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.
Faiblesses (CWE)
Références
Scores
| Version | Score | Vecteur | Évalué par |
|---|---|---|---|
| CVSS 3.1 | MEDIUM 6.6 | CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H | GitHub_M |
| CVSS 3.1 | MEDIUM 6.6 | CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H | NVD · security-advisories@github.com (Secondary) |
Avis
- GHSA-mf9w-mj56-hr94 — python-dotenv: Symlink following in set_key allows arbitrary file overwrite via cross-device rename fallback
- PYSEC-2026-2270 — 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-
Références européennes
- ENISA EUVD · EUVD-2026-23901
- GCVE · GCVE-0-2026-28684
Avis du CERT-FR
- CERTFR-2026-AVI-1056 — Multiples vulnérabilités dans les produits Splunk · cert.ssi.gouv.fr
- CERTFR-2026-AVI-0901 — Multiples vulnérabilités dans les produits IBM · cert.ssi.gouv.fr
Configurations affectées (CPE NVD)
cpe:2.3:a:saurabh-kumar:python-dotenv:*:*:*:*:*:python:*:*< 1.2.2
Produits affectés
| Produit | Versions |
|---|---|
| theskumar · python-dotenv | affected < 1.2.2 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST — attribution requested |
| ENISA EUVD | ENISA — reproduction authorised, source acknowledged |
| CERT-FR (ANSSI) | Licence Ouverte / Etalab 2.0 |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain — this product uses data from the NVD API but is not endorsed or certified by the NVD |