CVE-2025-6075
JSON

1.8low

Quadratic complexity in os.path.expandvars() with user-controlled template

Severity
1.8low CVSS:4.0 by PSF
Exploit likelihood
0.15% (higher than 4% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
PSF
Also known as
PSF-2025-13BIT-LIBPYTHON-2025-6075BIT-PYTHON-2025-6075BIT-PYTHON-MIN-2025-6075

Description

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

Affected

Product or packageVersionsReported by
Python Software Foundation CPythonbefore 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.0a2CVE List
https://github.com/python/cpythonbefore 2e6150adccaaf5bd95d4c19dfd04a36e0b325d8c, before 631ba3407e3348ccd56ce5160c4fb2c5dc5f4d84, before 892747b4cf0f95ba8beb51c0d0658bfaa381ebca, before 9ab89c026aa9611c4b0b67c288b8303a480fe742, before c8a5f3435c342964e0a432cc9fb448b7dbecd1ba, before f029e8db626ddc6e3a3beea4eff511a71aaceb5c, before 5dceb93486176e6b4a6d9754491005113eb23427Python Software Foundation
python pythonbefore 3.9.0, from 3.13.1 before 3.13.11, from 3.14.0 before 3.14.1, 3.15.0NVD
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.1Bitnami Vulnerability Database
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.1Bitnami Vulnerability Database
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.1Bitnami Vulnerability Database

All scores

PSF1.8low CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
NVD5.5medium CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Bitnami Vulnerability Databasemedium rating

Classification

CWE-400

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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

NVD (es)

Si el valor pasado a os.path.expandvars() es controlado por el usuario, es posible una degradación del rendimiento al expandir variables de entorno.

References

https://github.com/python/cpython/issues/136065advisory, 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/2e6150adccaaf5bd95d4c19dfd04a36e0b325d8cfix, patch
https://github.com/python/cpython/commit/631ba3407e3348ccd56ce5160c4fb2c5dc5f4d84fix, patch
https://github.com/python/cpython/commit/892747b4cf0f95ba8beb51c0d0658bfaa381ebcafix, patch
https://github.com/python/cpython/commit/9ab89c026aa9611c4b0b67c288b8303a480fe742fix, patch
https://github.com/python/cpython/commit/c8a5f3435c342964e0a432cc9fb448b7dbecd1bafix, patch
https://github.com/python/cpython/commit/f029e8db626ddc6e3a3beea4eff511a71aaceb5cfix, patch
https://github.com/python/cpython/commit/5dceb93486176e6b4a6d9754491005113eb23427fix, patch
https://nvd.nist.gov/vuln/detail/CVE-2025-6075web

Sources

SourceRecordLicence
CVE ListCVE-2025-6075 changed 2026-07-31CVE Terms of Use
Python Software FoundationPSF-2025-13 changed 2025-12-02CC-BY-4.0
NVDCVE-2025-6075 changed 2026-10-07Public domain
Bitnami Vulnerability DatabaseBIT-LIBPYTHON-2025-6075 changed 2026-09-10Apache-2.0
Bitnami Vulnerability DatabaseBIT-PYTHON-2025-6075 changed 2026-09-10Apache-2.0
Bitnami Vulnerability DatabaseBIT-PYTHON-MIN-2025-6075 changed 2026-09-10Apache-2.0