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

- Severity: Low 1.8 (CVSS:4.0, scored by PSF) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.15%, higher than 4% of CVEs (2026-12-01)
- Published: 2025-10-31T16:41:34.983Z
- Modified: 2026-10-07T21:10:00.200Z
- Also known as: PSF-2025-13, BIT-LIBPYTHON-2025-6075, BIT-PYTHON-2025-6075, BIT-PYTHON-MIN-2025-6075
- Weaknesses: CWE-400
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: PSF

## Description

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

(As written by CVE List.)

## Affected

- Python Software Foundation CPython: before 3.9.25; from 3.10.0 before 3.10.20; from 3.11.0 before 3.11.15; from 3.12.0 before 3.12.13; from 3.13.0 before 3.13.10; from 3.14.0 before 3.14.1; from 3.15.0a1 before 3.15.0a2
- https://github.com/python/cpython: before 2e6150adccaaf5bd95d4c19dfd04a36e0b325d8c; before 631ba3407e3348ccd56ce5160c4fb2c5dc5f4d84; before 892747b4cf0f95ba8beb51c0d0658bfaa381ebca; before 9ab89c026aa9611c4b0b67c288b8303a480fe742; before c8a5f3435c342964e0a432cc9fb448b7dbecd1ba; before f029e8db626ddc6e3a3beea4eff511a71aaceb5c; before 5dceb93486176e6b4a6d9754491005113eb23427
- python python: before 3.9.0; from 3.13.1 before 3.13.11; from 3.14.0 before 3.14.1; 3.15.0
- libpython (Bitnami): before 3.9.25; from 3.10.0 before 3.10.20; from 3.11.0 before 3.11.15; from 3.12.0 before 3.12.13; from 3.13.0 before 3.13.10; from 3.14.0 before 3.14.1
- python (Bitnami): before 3.9.25; from 3.10.0 before 3.10.20; from 3.11.0 before 3.11.15; from 3.12.0 before 3.12.13; from 3.13.0 before 3.13.10; from 3.14.0 before 3.14.1
- python-min (Bitnami): before 3.9.25; from 3.10.0 before 3.10.20; from 3.11.0 before 3.11.15; from 3.12.0 before 3.12.13; from 3.13.0 before 3.13.10; from 3.14.0 before 3.14.1

## Every score

- PSF: CVSS:4.0 1.8 Low `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`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Bitnami Vulnerability Database: rating Medium

## References

- <https://github.com/python/cpython/issues/136065> (advisory, issue-tracking, report, vendor-advisory)
- <https://mail.python.org/archives/list/security-announce@python.org/thread/IUP5QJ6D4KK6ULHOMPC7DPNKRYQTQNLA/> (advisory, third-party-advisory, vendor-advisory)
- <https://github.com/python/cpython/commit/2e6150adccaaf5bd95d4c19dfd04a36e0b325d8c> (fix, patch)
- <https://github.com/python/cpython/commit/631ba3407e3348ccd56ce5160c4fb2c5dc5f4d84> (fix, patch)
- <https://github.com/python/cpython/commit/892747b4cf0f95ba8beb51c0d0658bfaa381ebca> (fix, patch)
- <https://github.com/python/cpython/commit/9ab89c026aa9611c4b0b67c288b8303a480fe742> (fix, patch)
- <https://github.com/python/cpython/commit/c8a5f3435c342964e0a432cc9fb448b7dbecd1ba> (fix, patch)
- <https://github.com/python/cpython/commit/f029e8db626ddc6e3a3beea4eff511a71aaceb5c> (fix, patch)
- <https://github.com/python/cpython/commit/5dceb93486176e6b4a6d9754491005113eb23427> (fix, patch)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-6075> (web)

## Sources

- CVE List: [CVE-2025-6075](https://www.cve.org/CVERecord?id=CVE-2025-6075), CVE Terms of Use, modified 2026-07-31
- Python Software Foundation: [PSF-2025-13](https://osv.dev/vulnerability/PSF-2025-13), CC-BY-4.0, modified 2025-12-02
- NVD: [CVE-2025-6075](https://nvd.nist.gov/vuln/detail/CVE-2025-6075), Public domain, modified 2026-10-07
- Bitnami Vulnerability Database: [BIT-LIBPYTHON-2025-6075](https://osv.dev/vulnerability/BIT-LIBPYTHON-2025-6075), Apache-2.0, modified 2026-09-10
- Bitnami Vulnerability Database: [BIT-PYTHON-2025-6075](https://osv.dev/vulnerability/BIT-PYTHON-2025-6075), Apache-2.0, modified 2026-09-10
- Bitnami Vulnerability Database: [BIT-PYTHON-MIN-2025-6075](https://osv.dev/vulnerability/BIT-PYTHON-MIN-2025-6075), Apache-2.0, modified 2026-09-10

---

Page: https://cve.day/CVE-2025-6075 · Whole record: https://cve.day/CVE-2025-6075.json · Rebuilt by cve.day 2026-11-25T22:59:07.096Z
