PYSEC-2026-2270

See a problem?
Import Source
https://github.com/pypa/advisory-database/blob/main/vulns/python-dotenv/PYSEC-2026-2270.yaml
JSON Data
https://api.osv.dev/v1/vulns/PYSEC-2026-2270
Aliases
Published
2026-04-20T17:16:33.087Z
Modified
2026-07-13T07:15:44.015809613Z
Severity
  • 6.6 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H CVSS Calculator
Summary
[none]
Details

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.

References

Affected packages

PyPI / python-dotenv

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.2.2

Affected versions

0.*
0.1.0
0.1.2
0.1.3
0.1.5
0.2.0
0.3.0
0.4.0
0.5.0
0.5.1
0.6.0
0.6.1
0.6.2
0.6.3
0.6.4
0.6.5
0.7.0
0.7.1
0.8.0
0.8.1
0.8.2
0.9.0
0.9.1
0.10.0
0.10.1
0.10.2
0.10.3
0.10.4
0.10.5
0.11.0
0.12.0
0.13.0
0.14.0
0.15.0
0.16.0
0.17.0
0.17.1
0.18.0
0.19.0
0.19.1
0.19.2
0.20.0
0.21.0
0.21.1
1.*
1.0.0
1.0.1
1.1.0
1.1.1
1.2.0
1.2.1

Database specific

source
"https://github.com/pypa/advisory-database/blob/main/vulns/python-dotenv/PYSEC-2026-2270.yaml"