python-dotenv: Symlink following in set_key allows arbitrary file overwrite via cross-device rename fallback (theskumar python-dotenv)

CVE-2026-28684
MEDIUM 6.6

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)

  • CWE-59 — Suivi de lien non maîtrisé
  • CWE-61 — UNIX Symbolic Link (Symlink) Following

Références

Scores

VersionScoreVecteurÉvalué par
CVSS 3.1MEDIUM 6.6CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:HGitHub_M
CVSS 3.1MEDIUM 6.6CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:HNVD · security-advisories@github.com (Secondary)

Avis

Références européennes

Avis du CERT-FR

Configurations affectées (CPE NVD)

Produits affectés

ProduitVersions
theskumar · python-dotenvaffected < 1.2.2

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD