Red Hat VEX
RHVEX-CVE-2024-9287
python: Virtual environment (venv) activation scripts don't quote paths
Details
A vulnerability has been found in the Python venv module and CLI. Path names provided when creating a virtual environment were not quoted properly, allowing the creator to inject commands into virtual environment "activation" scripts, for example, "source venv/bin/activate". This flaw allows attacker-controlled virtual environments to run commands when the virtual environment is activated.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| Red Hat:enterprise_linux:7 | python | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:7 | python-debug | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:7 | python-devel | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:7 | python-libs | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:7 | python-test | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:7 | python-tools | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:7 | python3 | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:7 | python3-debug | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:7 | python3-devel | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:7 | python3-idle | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:7 | python3-libs | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:7 | python3-test | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:7 | python3-tkinter | All versions, no fix (out of support scope) |
| Red Hat:enterprise_linux:7 | tkinter | All versions, no fix (out of support scope) |
References
- https://access.redhat.com/security/cve/CVE-2024-9287
- https://bugzilla.redhat.com/show_bug.cgi?id=2321440
- https://www.cve.org/CVERecord?id=CVE-2024-9287
- https://nvd.nist.gov/vuln/detail/CVE-2024-9287
- https://github.com/python/cpython/issues/124651
- https://github.com/python/cpython/pull/124712
- https://mail.python.org/archives/list/[email protected]/thread/RSPJ2B5JL22FG3TKUJ7D7DQ4N5JRRBZL/