Security mailing lists by PureSourceCode

CVE-2026-28684

MEDIUM 6.6CVSS 3.1

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

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.

Published
20 Apr 2026
Last modified
26 Oct 2026
Assigned by
security-advisories@github.com
NVD status
Analyzed
Weakness
CWE-59CWE-61
Also known as
GHSA-mf9w-mj56-hr94PYSEC-2026-2270
Sources
NVDJSONOSV GHSA-mf9w-mj56-hr94JSONOSV PYSEC-2026-2270JSON

Scores

SourceScored byVersionScoreVector / decision
NVD security-advisories@github.com (Secondary) 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
OSV GitHub 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
OSV PyPA 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

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD saurabh-kumar python-dotenv
cpe:2.3:a:saurabh-kumar:python-dotenv:*:*:*:*:*:python:*:*
< 1.2.2 1.2.2
OSV PyPI python-dotenv < 1.2.2 1.2.2

References

History

  • 25 Nov 2026 21:02 UTC · NVD: first stored (published 20 Apr 2026)
  • 25 Nov 2026 20:12 UTC · OSV: first stored (published 20 Apr 2026)
  • 25 Nov 2026 20:11 UTC · OSV: first stored (published 21 Apr 2026)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.