Skip to content

python-dotenv (PyPI)

Reads key-value pairs from a .env file and can set them as environment variables. It helps in developing applications following the 12-factor principles.

Advisories
3
Latest version
1.2.4
Released Oct 1, 2026
License
BSD-3-Clause
OpenSSF Scorecard
6.3 / 10

How to fix

Upgrading to 1.2.2 or later clears every advisory below that has a fix.

Upgrade commands
pip
pip install --upgrade "python-dotenv>=1.2.4"
poetry
poetry add "python-dotenv>=1.2.4"
uv
uv add "python-dotenv>=1.2.4"

Known vulnerabilities

AdvisorySeverityAffectedFixed in
GHSA-mf9w-mj56-hr94
python-dotenv: Symlink following in set_key allows arbitrary file overwrite via cross-device rename fallback
Medium
EPSS 0.25%
< 1.2.2
1.2.2
GHSA-mf9w-mj56-hr94
python-dotenv: Symlink following in set_key allows arbitrary file overwrite via cross-device rename fallback
Medium
EPSS 0.25%
< 1.2.2
1.2.2
GHSA-mf9w-mj56-hr94
python-dotenv: Symlink following in set_key allows arbitrary file overwrite via cross-device rename fallback
Medium
EPSS 0.25%
< 1.2.2
1.2.2

Source: https://github.com/theskumar/python-dotenv

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor