Quadratic complexity in os.path.expandvars() with user-controlled template
Priority LOW 9CWE-400Published · Updated
Key facts
- Attack vector
- Local
- Privileges required
- High
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · Low
- Fix status
- Partial Red Hat: 16 fixed, 8 without a fix
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and Red Hat. Impact type from CWE-400.
Summary
If the value passed to os.path.expandvars() is user-controlled a performance degradation is possible when expanding environment variables.
Why it matters now
Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00149 4th percentileScored 2026-11-07
Fix Partial CPython (Python Software Foundation): 3.9.25, 3.10.20, 3.11.15 +4Red Hat: 16 advisoriesRed Hat: 16 fixed, 8 without a fix
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Python Software Foundation | CPython | before 3.9.25; 3.10.0 to before 3.10.20; 3.11.0 to before 3.11.15; 3.12.0 to before 3.12.13; 3.13.0 to before 3.13.10; 3.14.0 to before 3.14.1; 3.15.0a1 to before 3.15.0a2 | 3.9.25, 3.10.20, 3.11.15, 3.12.13, 3.13.10, 3.14.1, 3.15.0a2 | Patch available | CNA |
- CPython VendorPython Software Foundation Affected before 3.9.25; 3.10.0 to before 3.10.20; 3.11.0 to before 3.11.15; 3.12.0 to before 3.12.13; 3.13.0 to before 3.13.10; 3.14.0 to before 3.14.1; 3.15.0a1 to before 3.15.0a2 Fixed in 3.9.25, 3.10.20, 3.11.15, 3.12.13, 3.13.10, 3.14.1, 3.15.0a2 Patch available CNA
CPE configurations NVD · 2
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:python:python:*:*:*:*:*:*:*:* | before 3.9.0; 3.13.1 to before 3.13.11; 3.14.0 to before 3.14.1 | Vulnerable | python-pillow |
| cpe:2.3:a:python:python:3.15.0:alpha1:*:*:*:*:*:* | 3.15.0 alpha1 | Vulnerable | python-pillow |
- cpe:2.3:a:python:python:*:*:*:*:*:*:*:* Versions before 3.9.0; 3.13.1 to before 3.13.11; 3.14.0 to before 3.14.1 Vulnerable ·python-pillow
- cpe:2.3:a:python:python:3.15.0:alpha1:*:*:*:*:*:* Versions 3.15.0 alpha1 Vulnerable ·python-pillow
Remediation
- Fix · CNA CPython (Python Software Foundation) Fixed in 3.9.25, 3.10.20, 3.11.15, 3.12.13, 3.13.10, 3.14.1, 3.15.0a2
Red Hat 16 advisories
- RHSA-2026:76945 Released 2026-10-06 · Red Hat rating Importantpython3.9 security update
- Red Hat Enterprise Linux AppStream E4S (v.9.2) python-unversioned-command-3.9.16-1.el9_2.15, python3-devel-3.9.16-1.el9_2.15, python3-tkinter-3.9.16-1.el9_2.15
- Red Hat Enterprise Linux BaseOS E4S (v.9.2) python3-3.9.16-1.el9_2.15, python3-libs-3.9.16-1.el9_2.15, python3.9-3.9.16-1.el9_2.15
- RHSA-2026:74087 Released 2026-09-30 · Red Hat rating Importantpython3.9 security update
- Red Hat Enterprise Linux AppStream E4S (v.9.4) python-unversioned-command-3.9.18-3.el9_4.14, python3-devel-3.9.18-3.el9_4.14, python3-tkinter-3.9.18-3.el9_4.14
- Red Hat Enterprise Linux BaseOS E4S (v.9.4) python3-3.9.18-3.el9_4.14, python3-libs-3.9.18-3.el9_4.14, python3.9-3.9.18-3.el9_4.14
- RHSA-2026:58981 Released 2026-08-24 · Red Hat rating CriticalRed Hat Update Infrastructure 5.3 Technology Preview security update
- Red Hat Update Infrastructure 5 registry.redhat.io/rhui5/cds-kubernetes-tp-rhel9, registry.redhat.io/rhui5/installer-tp-rhel9, registry.redhat.io/rhui5/rhua-tp-rhel9
Show 13 more Red Hat advisories
- RHSA-2026:21275 Released 2026-05-27 · Red Hat rating CriticalRed Hat Update Infrastructure 5.1 security update
- Red Hat Update Infrastructure 5 registry.redhat.io/rhui5/cds-rhel9, registry.redhat.io/rhui5/haproxy-rhel9, registry.redhat.io/rhui5/installer-rhel9 +1
- RHSA-2026:19177 Released 2026-05-19 · Red Hat rating Importantpython3.12 security update
- Red Hat Enterprise Linux AppStream (v. 9) python3.12-3.12.13-2.el9_8, python3.12-devel-3.12.13-2.el9_8, python3.12-libs-3.12.13-2.el9_8 +1
- Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) python3.12-3.12.13-2.el9_8, python3.12-debug-3.12.13-2.el9_8, python3.12-idle-3.12.13-2.el9_8 +2
- RHSA-2026:19064 Released 2026-05-19 · Red Hat rating Importantpython3.12 security update
- Red Hat Enterprise Linux AppStream (v. 10) python-unversioned-command-3.12.13-2.el10_2, python3-devel-3.12.13-2.el10_2, python3-tkinter-3.12.13-2.el10_2
- Red Hat Enterprise Linux BaseOS (v. 10) python3-3.12.13-2.el10_2, python3-libs-3.12.13-2.el10_2, python3.12-3.12.13-2.el10_2
- Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) python3-debug-3.12.13-2.el10_2, python3-idle-3.12.13-2.el10_2, python3-test-3.12.13-2.el10_2
- RHSA-2026:10950 Released 2026-04-27 · Red Hat rating Importantpython3.12 security update
- Red Hat Enterprise Linux AppStream (v. 8) python3.12-3.12.13-2.el8_10, python3.12-devel-3.12.13-2.el8_10, python3.12-libs-3.12.13-2.el8_10 +2
- Red Hat Enterprise Linux CRB (v. 8) python3.12-3.12.13-2.el8_10, python3.12-debug-3.12.13-2.el8_10, python3.12-idle-3.12.13-2.el8_10 +2
- RHSA-2026:8824 Released 2026-04-17 · Red Hat rating ImportantRed Hat Hardened Images RPMs bug fix and enhancement update
- Red Hat Hardened Images python3.12-3.12.13-3.hum1@aarch64, python3.12-3.12.13-3.hum1@src, python3.12-3.12.13-3.hum1@x86_64 +12
- RHSA-2026:8822 Released 2026-04-17 · Red Hat rating ImportantRed Hat Hardened Images RPMs bug fix and enhancement update
- Red Hat Hardened Images python3.11-3.11.15-4.hum1@aarch64, python3.11-3.11.15-4.hum1@src, python3.11-3.11.15-4.hum1@x86_64 +12
- RHSA-2026:7661 Released 2026-04-11 · Red Hat rating ImportantRed Hat Hardened Images RPMs bug fix and enhancement update
- Red Hat Hardened Images python-unversioned-command-3.14.4-1.hum1@noarch@public-hummingbird-aarch64-rpms, python-unversioned-command-3.14.4-1.hum1@noarch@public-hummingbird-x86_64-rpms, python3-3.14.4-1.hum1@aarch64 +28
- RHSA-2026:7443 Released 2026-04-10 · Red Hat rating ImportantRed Hat Hardened Images RPMs bug fix and enhancement update
- Red Hat Hardened Images python3.13-3.13.13-1.hum1@aarch64, python3.13-3.13.13-1.hum1@src, python3.13-3.13.13-1.hum1@x86_64 +16
- RHSA-2026:1652 Released 2026-02-02 · Red Hat rating ImportantRed Hat Ceph Storage
- Red Hat Ceph Storage 8 registry.redhat.io/rhceph/rhceph-8-rhel9
- RHSA-2026:0685 Released 2026-01-15 · Red Hat rating ModerateRed Hat Update Infrastructure 5 security update
- Red Hat Update Infrastructure 5 registry.redhat.io/rhui5/cds-rhel9, registry.redhat.io/rhui5/haproxy-rhel9, registry.redhat.io/rhui5/installer-rhel9 +1
- RHSA-2026:0414 Released 2026-01-08 · Red Hat rating ImportantA Subscription Management tool for finding and reporting Red Hat product usage
- Red Hat Discovery 2 registry.redhat.io/discovery/discovery-server-rhel9, registry.redhat.io/discovery/discovery-ui-rhel9
- RHSA-2025:23342 Released 2025-12-18 · Red Hat rating Moderatepython3.9 security update
- Red Hat Enterprise Linux AppStream (v. 9) python-unversioned-command-3.9.25-2.el9_7, python3-devel-3.9.25-2.el9_7, python3-tkinter-3.9.25-2.el9_7
- Red Hat Enterprise Linux BaseOS (v. 9) python3-3.9.25-2.el9_7, python3-libs-3.9.25-2.el9_7, python3.9-3.9.25-2.el9_7
- Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) python3-3.9.25-2.el9_7, python3-debug-3.9.25-2.el9_7, python3-idle-3.9.25-2.el9_7 +2
- RHSA-2025:23530 Released 2025-12-18 · Red Hat rating Importantpython39:3.9 security update
- Red Hat Enterprise Linux AppStream (v. 8) PyYAML-5.4.1-1.module+el8.9.0+19644+d68f775d.src::python39:3.9, mod_wsgi-4.7.1-7.module+el8.10.0+23075+0aa18782.1.src::python39:3.9, numpy-1.19.4-3.module+el8.9.0+19644+d68f775d.src::python39:3.9 +47
- Red Hat Enterprise Linux CRB (v. 8) Cython-0.29.21-5.module+el8.9.0+19644+d68f775d.src::python39-devel:3.9, pybind11-2.7.1-1.module+el8.9.0+19644+d68f775d.src::python39-devel:3.9, pytest-6.0.2-2.module+el8.9.0+19644+d68f775d.src::python39-devel:3.9 +33
Vendor assessments
Red Hat
Red Hat rating: Low. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 10 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 6 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 7 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 8 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux 9 | Affected | No fix yet: Fix deferred |
| Red Hat Enterprise Linux AI (RHEL AI) | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift AI (RHOAI) | Affected | No fix yet: Fix deferred |
| Red Hat OpenShift Dev Spaces | Affected | No fix yet: Fix deferred |
| Red Hat Ceph Storage 8 | Fixed | RHSA-2026:1652 |
| Red Hat Discovery 2 | Fixed | RHSA-2026:0414 |
| Red Hat Enterprise Linux AppStream (v. 10) | Fixed | RHSA-2026:19064 |
| Red Hat Enterprise Linux AppStream (v. 8) | Fixed | RHSA-2025:23530, RHSA-2026:10950 |
| Red Hat Enterprise Linux AppStream (v. 9) | Fixed | RHSA-2025:23342, RHSA-2026:19177 |
| Red Hat Enterprise Linux AppStream E4S (v.9.2) | Fixed | RHSA-2026:76945 |
| Red Hat Enterprise Linux AppStream E4S (v.9.4) | Fixed | RHSA-2026:74087 |
| Red Hat Enterprise Linux BaseOS (v. 10) | Fixed | RHSA-2026:19064 |
| Red Hat Enterprise Linux BaseOS (v. 9) | Fixed | RHSA-2025:23342 |
| Red Hat Enterprise Linux BaseOS E4S (v.9.2) | Fixed | RHSA-2026:76945 |
| Red Hat Enterprise Linux BaseOS E4S (v.9.4) | Fixed | RHSA-2026:74087 |
| Red Hat Enterprise Linux CRB (v. 8) | Fixed | RHSA-2025:23530, RHSA-2026:10950 |
| Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) | Fixed | RHSA-2026:19064 |
| Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) | Fixed | RHSA-2025:23342, RHSA-2026:19177 |
| Red Hat Hardened Images | Fixed | RHSA-2026:7443, RHSA-2026:7661, RHSA-2026:8822, RHSA-2026:8824 |
| Red Hat Update Infrastructure 5 | Fixed | RHSA-2026:0685, RHSA-2026:21275, RHSA-2026:58981 |
Not affected: 2 products
- Red Hat Ceph Storage 8
- Red Hat Update Infrastructure 5
Timeline
- 2026-10-02 Threatist record created from CVE-2025-6075
- 2026-10-03 Alias added: GHSA-vc2m-m665-8xm2
- 2026-10-07 Fix available: RHSA-2026:76945 · Red Hat
- 2026-10-07 Fix available: Red Hat Enterprise Linux AppStream E4S (v.9.2), Red Hat Enterprise Linux BaseOS E4S (v.9.2) · Red Hat
References
Patch 7
- https://github.com/python/cpython/commit/2e6150adccaaf5bd95d4c19dfd04a36e0b325d8c
- https://github.com/python/cpython/commit/631ba3407e3348ccd56ce5160c4fb2c5dc5f4d84
- https://github.com/python/cpython/commit/892747b4cf0f95ba8beb51c0d0658bfaa381ebca
- https://github.com/python/cpython/commit/9ab89c026aa9611c4b0b67c288b8303a480fe742
- https://github.com/python/cpython/commit/c8a5f3435c342964e0a432cc9fb448b7dbecd1ba
- https://github.com/python/cpython/commit/f029e8db626ddc6e3a3beea4eff511a71aaceb5c
- https://github.com/python/cpython/commit/5dceb93486176e6b4a6d9754491005113eb23427
More Python Software Foundation vulnerabilities
- TI-2024-07037 Quadratic complexity parsing cookies with backslashes CVSS 3.1HIGH 7.5
- TI-2024-11791 Bypass extraction filter to modify file metadata outside extraction directory CVSS 3.1MEDIUM 5.3
- TI-2024-00411 Quoted zip-bomb protection for zipfile CVSS 3.1MEDIUM 6.2
- TI-2026-13296 `HTTPPasswordMgr` can send saved HTTPS credentials via HTTP because of incorrect scheme matching CVSS 4.0MEDIUM 6.0
- TI-2024-06422 Email header injection due to unquoted newlines CVSS 3.1MEDIUM 5.5
- TI-2026-04606 Possible to hijack modules in current working directory CVSS 4.0MEDIUM 5.6
Sources
- CVE-2025-6075 · CVE Program
- CVE-2025-6075 · NVD
- FIRST EPSS
- GHSA-vc2m-m665-8xm2 · GitHub Advisory Database · CC BY 4.0
- CVE-2025-6075 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences