Python os.path.expandvars DoS via env var expansion
CVE-2025-6075 Published on October 31, 2025
Quadratic complexity in os.path.expandvars() with user-controlled template
If the value passed to os.path.expandvars() is user-controlled a
performance degradation is possible when expanding environment
variables.
Weakness Type
What is a Resource Exhaustion Vulnerability?
The software does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.
CVE-2025-6075 has been classified to as a Resource Exhaustion vulnerability or weakness.
Products Associated with CVE-2025-6075
You can be notified by email with stack.watch whenever vulnerabilities like CVE-2025-6075 are published in these products:
Affected Versions
Python Software Foundation CPython:- Before 3.10.20 is affected.
- Version 3.11.0 and below 3.11.15 is affected.
- Version 3.12.0 and below 3.12.13 is affected.
- Version 3.13.0 and below 3.13.10 is affected.
- Version 3.14.0 and below 3.14.1 is affected.
- Version 3.15.0a1 and below 3.15.0a2 is affected.
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.