# CVE-2025-6075: Quadratic complexity in os.path.expandvars() with user-controlled template

> Attackers can cause denial of service by providing user-controlled input to os.path.expandvars(), triggering quadratic complexity in environment variable expansion.

- **Severity:** Low 1.8 (`CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 31 Oct 2025
- **Updated:** 31 Jul 2026
- **Also known as:** AZL-109695, AZL-69625, AZL-69628, BIT-libpython-2025-6075, BIT-python-2025-6075, BIT-python-min-2025-6075, CLSA-2026-1773323311, CLSA-2026-1773480954, CLSA-2026-1773481701, CLSA-2026-1773505272, DEBIAN-CVE-2025-6075, ECHO-a643-f216-2dc6, GHSA-vc2m-m665-8xm2, MINI-5f54-qcm5-6c7f, MINI-5fcj-rqg4-3pmh, MINI-jc79-x7wh-h7qw, MINI-q66w-gmvc-pfc4, MINI-q8m9-wcpp-cv9m, OESA-2025-2869, PSF-2025-13, SUSE-SU-2026:0337-1, UBUNTU-CVE-2025-6075, openSUSE-SU-2025:15791-1

## What is CVE-2025-6075?

CVE-2025-6075 is a low-severity denial of service vulnerability in Python Python, published on 31 Oct 2025. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

If the value passed to os.path.expandvars() is user-controlled a 
performance degradation is possible when expanding environment 
variables.

Weakness: CWE-400 (Uncontrolled Resource Consumption)

## Which versions are affected by CVE-2025-6075?

3 open source packages ship an affected version, including libpython, python and python-min. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `libpython` | Bitnami | All versions | 3.9.25, 3.10.20, 3.11.15, 3.12.13, 3.13.10, 3.14.1 |
| `python` | Bitnami | All versions | 3.9.25, 3.10.20, 3.11.15, 3.12.13, 3.13.10, 3.14.1 |
| `python-min` | Bitnami | All versions | 3.9.25, 3.10.20, 3.11.15, 3.12.13, 3.13.10, 3.14.1 |
| `python` | SUSE:Linux Enterprise Module for Package Hub 15 SP7 | All versions | 2.7.18-150000.99.1 |
| `python-base` | SUSE:Linux Enterprise Module for Package Hub 15 SP7 | All versions | 2.7.18-150000.99.1 |
| `python` | openSUSE:Leap 15.6 | All versions | 2.7.18-150000.99.1 |
| `python-base` | openSUSE:Leap 15.6 | All versions | 2.7.18-150000.99.1 |
| `python-doc` | openSUSE:Leap 15.6 | All versions | 2.7.18-150000.99.1 |
| `python315` | openSUSE:Tumbleweed | All versions | 3.15.0~a1-2.1 |

Products: Python Python.

## How do I fix CVE-2025-6075?

Upgrade libpython to a fixed version for your release line: 3.9.25, 3.10.20, 3.11.15 or 3.12.13.

## Is CVE-2025-6075 being exploited?

There is no known exploitation of CVE-2025-6075 in the wild and no public exploit code.

## Other vulnerabilities in Python Python

- [CVE-2008-5031](https://insights.sbomify.com/CVE-2008-5031/): Integer overflow in n/a (critical 10.0)
- [CVE-2014-4650](https://insights.sbomify.com/CVE-2014-4650/): Path traversal in n/a (critical 9.8)
- [CVE-2016-5636](https://insights.sbomify.com/CVE-2016-5636/): Integer overflow in n/a (critical 9.8)
- [CVE-2007-4559](https://insights.sbomify.com/CVE-2007-4559/): Path traversal in n/a (critical 9.8)
- [CVE-2017-17522](https://insights.sbomify.com/CVE-2017-17522/): Command injection in n/a (high 8.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-6075 and fix it if it is affected.

What it is: CVE-2025-6075 is a low-severity denial of service vulnerability in Python Python, published on 31 Oct 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-6075 in the wild and no public exploit code.

Affected packages and fixed versions:
- libpython (Bitnami): affected all versions; fixed in 3.9.25, 3.10.20, 3.11.15, 3.12.13, 3.13.10, 3.14.1
- python (Bitnami): affected all versions; fixed in 3.9.25, 3.10.20, 3.11.15, 3.12.13, 3.13.10, 3.14.1
- python-min (Bitnami): affected all versions; fixed in 3.9.25, 3.10.20, 3.11.15, 3.12.13, 3.13.10, 3.14.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-6075/ (Markdown: https://insights.sbomify.com/CVE-2025-6075/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-6075
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-6075
- OSV: https://osv.dev/vulnerability/CVE-2025-6075

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-6075/
Summaries are generated and may contain mistakes; the official description above is the record.
