Virtual environment (venv) activation scripts don't quote paths
Key facts
- Attack vector
- Local
- Privileges required
- High
- User interaction
- Active
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · None
- Fix status
- Partial Red Hat: 12 fixed, 1 without a fix
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and Red Hat. Impact type from CWE-428.
Summary
A vulnerability has been found in the CPython `venv` module and CLI where path names provided when creating a virtual environment were not quoted properly, allowing the creator to inject commands into virtual environment "activation" scripts (ie "source venv/bin/activate"). This means that attacker-controlled virtual environments are able to run commands when the virtual environment is activated. Virtual environments which are not created by an attacker or which aren't activated before being used (ie "./venv/bin/python") are not affected.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Total
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.21; 3.10.0 to before 3.10.16; 3.11.0 to before 3.11.11; 3.12.0 to before 3.12.8; 3.13.0 to before 3.13.1; 3.14.0a1 to before 3.14.0a2 | 3.9.21, 3.10.16, 3.11.11, 3.12.8, 3.13.1, 3.14.0a2 | Patch available | CNA |
- CPython VendorPython Software Foundation Affected before 3.9.21; 3.10.0 to before 3.10.16; 3.11.0 to before 3.11.11; 3.12.0 to before 3.12.8; 3.13.0 to before 3.13.1; 3.14.0a1 to before 3.14.0a2 Fixed in 3.9.21, 3.10.16, 3.11.11, 3.12.8, 3.13.1, 3.14.0a2 Patch available CNA
CPE configurations NVD · 2
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:python:python:*:*:*:*:*:*:*:* | before 3.9.21; 3.10.0 to before 3.10.16; 3.11.0 to before 3.11.11; 3.12.0 to before 3.12.8; 3.13.0 to before 3.13.1 | Vulnerable | python-pillow |
| cpe:2.3:a:python:python:3.14.0:alpha1:*:*:*:*:*:* | 3.14.0 alpha1 | Vulnerable | python-pillow |
- cpe:2.3:a:python:python:*:*:*:*:*:*:*:* Versions before 3.9.21; 3.10.0 to before 3.10.16; 3.11.0 to before 3.11.11; 3.12.0 to before 3.12.8; 3.13.0 to before 3.13.1 Vulnerable ·python-pillow
- cpe:2.3:a:python:python:3.14.0:alpha1:*:*:*:*:*:* Versions 3.14.0 alpha1 Vulnerable ·python-pillow
Remediation
- Fix · CNA CPython (Python Software Foundation) Fixed in 3.9.21, 3.10.16, 3.11.11, 3.12.8, 3.13.1, 3.14.0a2
Red Hat 10 advisories
- 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
- RHSA-2025:0280 Released 2025-01-13 · Red Hat rating Moderatepython3.11 security update
- Red Hat CodeReady Linux Builder EUS (v.9.4) python3.11-3.11.7-1.el9_4.7, python3.11-debug-3.11.7-1.el9_4.7, python3.11-idle-3.11.7-1.el9_4.7 +2
- Red Hat Enterprise Linux AppStream EUS (v.9.4) python3.11-3.11.7-1.el9_4.7, python3.11-devel-3.11.7-1.el9_4.7, python3.11-libs-3.11.7-1.el9_4.7 +1
- RHSA-2024:11111 Released 2024-12-16 · Red Hat rating Moderatepython3.11 security update
- Red Hat CodeReady Linux Builder (v. 9) python3.11-3.11.9-7.el9_5.2, python3.11-debug-3.11.9-7.el9_5.2, python3.11-idle-3.11.9-7.el9_5.2 +2
- Red Hat Enterprise Linux AppStream (v. 9) python3.11-3.11.9-7.el9_5.2, python3.11-devel-3.11.9-7.el9_5.2, python3.11-libs-3.11.9-7.el9_5.2 +1
Show 7 more Red Hat advisories
- RHSA-2024:11035 Released 2024-12-13 · Red Hat rating Importantpython3.12 security update
- Red Hat CodeReady Linux Builder EUS (v.9.4) python3.12-3.12.1-4.el9_4.5, python3.12-debug-3.12.1-4.el9_4.5, python3.12-idle-3.12.1-4.el9_4.5 +2
- Red Hat Enterprise Linux AppStream EUS (v.9.4) python3.12-3.12.1-4.el9_4.5, python3.12-devel-3.12.1-4.el9_4.5, python3.12-libs-3.12.1-4.el9_4.5 +1
- RHSA-2024:11024 Released 2024-12-12 · Red Hat rating Moderatepython3.9:3.9.18 security update
- Red Hat CodeReady Linux Builder EUS (v.9.4) python3-3.9.18-3.el9_4.7, python3-debug-3.9.18-3.el9_4.7, python3-idle-3.9.18-3.el9_4.7 +2
- Red Hat Enterprise Linux AppStream EUS (v.9.4) python-unversioned-command-3.9.18-3.el9_4.7, python3-devel-3.9.18-3.el9_4.7, python3-tkinter-3.9.18-3.el9_4.7
- Red Hat Enterprise Linux BaseOS EUS (v.9.4) python3-3.9.18-3.el9_4.7, python3-libs-3.9.18-3.el9_4.7, python3.9-3.9.18-3.el9_4.7
- RHSA-2024:10983 Released 2024-12-12 · Red Hat rating Moderatepython3.9:3.9.21 security update
- Red Hat CodeReady Linux Builder (v. 9) python3-3.9.21-1.el9_5, python3-debug-3.9.21-1.el9_5, python3-idle-3.9.21-1.el9_5 +2
- Red Hat Enterprise Linux AppStream (v. 9) python-unversioned-command-3.9.21-1.el9_5, python3-devel-3.9.21-1.el9_5, python3-tkinter-3.9.21-1.el9_5
- Red Hat Enterprise Linux BaseOS (v. 9) python3-3.9.21-1.el9_5, python3-libs-3.9.21-1.el9_5, python3.9-3.9.21-1.el9_5
- RHSA-2024:10980 Released 2024-12-12 · Red Hat rating Importantpython3.12 security update
- Red Hat Enterprise Linux AppStream (v. 8) python3.12-3.12.8-1.el8_10, python3.12-devel-3.12.8-1.el8_10, python3.12-libs-3.12.8-1.el8_10 +2
- Red Hat Enterprise Linux CRB (v. 8) python3.12-3.12.8-1.el8_10, python3.12-debug-3.12.8-1.el8_10, python3.12-idle-3.12.8-1.el8_10 +2
- RHSA-2024:10979 Released 2024-12-12 · Red Hat rating Moderatepython3.11 security update
- Red Hat Enterprise Linux AppStream (v. 8) python3.11-3.11.11-1.el8_10, python3.11-devel-3.11.11-1.el8_10, python3.11-libs-3.11.11-1.el8_10 +2
- Red Hat Enterprise Linux CRB (v. 8) python3.11-3.11.11-1.el8_10, python3.11-debug-3.11.11-1.el8_10, python3.11-idle-3.11.11-1.el8_10 +2
- RHSA-2024:10978 Released 2024-12-12 · Red Hat rating Importantpython3.12 security update
- Red Hat CodeReady Linux Builder (v. 9) python3.12-3.12.5-2.el9_5.2, python3.12-debug-3.12.5-2.el9_5.2, python3.12-idle-3.12.5-2.el9_5.2 +2
- Red Hat Enterprise Linux AppStream (v. 9) python3.12-3.12.5-2.el9_5.2, python3.12-devel-3.12.5-2.el9_5.2, python3.12-libs-3.12.5-2.el9_5.2 +1
- RHSA-2024:10779 Released 2024-12-04 · Red Hat rating Moderatepython3:3.6.8 security update
- Red Hat Enterprise Linux AppStream (v. 8) platform-python-3.6.8-69.el8_10, platform-python-debug-3.6.8-69.el8_10, platform-python-devel-3.6.8-69.el8_10 +3
- Red Hat Enterprise Linux BaseOS (v. 8) platform-python-3.6.8-69.el8_10, python3-3.6.8-69.el8_10, python3-libs-3.6.8-69.el8_10 +1
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 7 | Affected | No fix planned: Out of support scope |
| Red Hat CodeReady Linux Builder (v. 9) | Fixed | RHSA-2024:10978, RHSA-2024:10983, RHSA-2024:11111 |
| Red Hat CodeReady Linux Builder EUS (v.9.4) | Fixed | RHSA-2024:11024, RHSA-2024:11035, RHSA-2025:0280 |
| Red Hat Enterprise Linux AppStream (v. 10) | Fixed | — |
| Red Hat Enterprise Linux AppStream (v. 8) | Fixed | RHSA-2024:10779, RHSA-2024:10979, RHSA-2024:10980, RHSA-2025:23530 |
| Red Hat Enterprise Linux AppStream (v. 9) | Fixed | RHSA-2024:10978, RHSA-2024:10983, RHSA-2024:11111 |
| Red Hat Enterprise Linux AppStream EUS (v.9.4) | Fixed | RHSA-2024:11024, RHSA-2024:11035, RHSA-2025:0280 |
| Red Hat Enterprise Linux BaseOS (v. 10) | Fixed | — |
| Red Hat Enterprise Linux BaseOS (v. 8) | Fixed | RHSA-2024:10779 |
| Red Hat Enterprise Linux BaseOS (v. 9) | Fixed | RHSA-2024:10983 |
| Red Hat Enterprise Linux BaseOS EUS (v.9.4) | Fixed | RHSA-2024:11024 |
| Red Hat Enterprise Linux CRB (v. 8) | Fixed | RHSA-2024:10979, RHSA-2024:10980, RHSA-2025:23530 |
| Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) | Fixed | — |
Not affected: 1 product
- Red Hat Enterprise Linux 8
Timeline
- 2026-10-02 Threatist record created from CVE-2024-9287
- 2026-10-03 Alias added: GHSA-grqq-hcc7-crmr
- 2026-10-18 EPSS moved to the 50th–90th percentile
- 2026-10-30 CISA SSVC decision points changed
References
Patch 7
- https://github.com/python/cpython/pull/124712
- https://github.com/python/cpython/commit/e52095a0c1005a87eed2276af7a1f2f66e2b6483
- https://github.com/python/cpython/commit/633555735a023d3e4d92ba31da35b1205f9ecbd7
- https://github.com/python/cpython/commit/8450b2482586857d689b6658f08de9c8179af7db
- https://github.com/python/cpython/commit/9286ab3a107ea41bd3f3c3682ce2512692bdded8
- https://github.com/python/cpython/commit/ae961ae94bf19c8f8c7fbea3d1c25cc55ce8ae97
- https://github.com/python/cpython/commit/d48cc82ed25e26b02eb97c6263d95dcaa1e9111b
Advisory 1
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-2024-9287 · CVE Program
- CVE-2024-9287 · NVD
- FIRST EPSS
- GHSA-grqq-hcc7-crmr · GitHub Advisory Database · CC BY 4.0
- CVE-2024-9287 · 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