Skip to main content

Python CVE-2026-28684

| EUVDEUVD-2026-23901 MEDIUM
Improper Link Resolution Before File Access (CWE-59)
2026-04-20 GitHub_M GHSA-mf9w-mj56-hr94
6.6
CVSS 3.1 · GitHub Advisory
Share

Severity by source

GitHub Advisory PRIMARY
6.6 MEDIUM
AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H
SUSE
MEDIUM
qualitative
Red Hat
7.1 MEDIUM
qualitative

Primary rating from GitHub Advisory.

CVSS VectorGitHub Advisory

CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:H
Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
Required
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
High

Lifecycle Timeline

6
Patch released
Apr 27, 2026 - 13:44 nvd
Patch available
Analysis Generated
Apr 20, 2026 - 17:54 vuln.today
Patch available
Apr 20, 2026 - 17:16 EUVD
EUVD ID Assigned
Apr 20, 2026 - 17:15 euvd
EUVD-2026-23901
Analysis Generated
Apr 20, 2026 - 17:15 vuln.today
CVE Published
Apr 20, 2026 - 16:25 nvd
MEDIUM 6.6

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 65,642 pypi packages depend on python-dotenv (21,464 direct, 45,281 indirect)

Ecosystem-wide dependent count for version 1.2.2.

DescriptionGitHub Advisory

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.

AnalysisAI

Local privilege escalation in python-dotenv before version 1.2.2 allows authenticated users to overwrite arbitrary files via symlink following in the set_key() and unset_key() functions when a cross-device rename fallback is triggered. An attacker with local access and the ability to write to the filesystem can create malicious symlinks that python-dotenv will follow during .env file rewriting, leading to unintended file modification or deletion. The vulnerability requires user interaction (the application must call set_key() or unset_key()) but affects any system using vulnerable versions of the library. No public exploit code or active exploitation has been reported at time of analysis.

Technical ContextAI

python-dotenv is a Python library that parses .env files and populates environment variables, commonly used in development and deployment workflows. The vulnerability resides in the set_key() and unset_key() functions which rewrite .env files. The root cause is CWE-59 (Improper Link Resolution Before File Access), a classic symlink-following flaw. When these functions attempt to rename a temporary file back to the original .env file, they may fall back to a copy-and-delete strategy if a cross-device rename (mv across filesystem boundaries) fails. During this fallback, the code does not verify that the target path is not a symlink, allowing an attacker who can create symlinks in the same directory to redirect writes to arbitrary locations on the system. The affected CPE is cpe:2.3:a:theskumar:python-dotenv:*:*:*:*:*:*:*:* with versions before 1.2.2 impacted.

RemediationAI

Upgrade python-dotenv to version 1.2.2 or later immediately. This is the primary remediation and completely resolves the symlink-following vulnerability. Users should update their requirements.txt or equivalent dependency file to python-dotenv>=1.2.2 and redeploy. For organizations unable to upgrade immediately, apply the manual patch commit 790c5c02991100aa1bf41ee5330aca75edc51311 from the GitHub repository (https://github.com/theskumar/python-dotenv/commit/790c5c02991100aa1bf41ee5330aca75edc51311), which adds symlink checks before file operations. As a compensating control with significant trade-offs, restrict filesystem permissions on directories containing .env files (mode 0700 for the directory, readable only by the owner) to prevent local attackers from creating symlinks in those locations; however, this may interfere with legitimate multi-user deployments or containerized environments where file ownership is complex. Additionally, mount /tmp and other temporary directories with the nofollow option to mitigate symlink attacks system-wide, but this can degrade performance and break legitimate symlink use cases.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2026-55255 HIGH POC
8.4 Jun 19

Cross-user flow execution in Langflow (< 1.9.1) lets any authenticated API-key holder run another user's flow by passing

Vendor StatusVendor

SUSE

Severity: Medium
Product Status
SUSE Linux Enterprise Module for Python 3 15 SP7 Affected
SUSE Linux Enterprise Server 15 SP7 Affected
SUSE Linux Enterprise Desktop 15 SP7 Affected
SUSE Linux Enterprise Server for SAP Applications 15 SP7 Affected
SUSE Linux Enterprise High Performance Computing 15 SP7 Affected

Share

CVE-2026-28684 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy