CVE-2024-9287
Virtual environment (venv) activation scripts don't quote paths
Description
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.
How to fix CVE-2024-9287
To remediate CVE-2024-9287, upgrade the affected package to a fixed version below.
- —upgrade to 3.11.11-r0 or later
- —upgrade to 3.9.21 or later
- —upgrade to 3.9.21 or later
- —upgrade to 3.9.21 or later
- —upgrade to 7.3.5+dfsg-2+deb11u4 or later
- —upgrade to 3.11.2-6+deb12u5 or later
- —upgrade to 3.13.1-1 or later
- —upgrade to 3.9.2-1+deb11u2 or later
Is CVE-2024-9287 being exploited?
Low — EPSS is 0.1%, meaning exploitation activity has not been observed at scale.
Affected packages (8)
- from 0, < 3.11.11-r0
- from 0, < 3.9.21, >= 3.10.0, < 3.10.16, >= 3.11.0, < 3.11.11, >= 3.12.0, < 3.12.8, >= 3.13.0, < 3.13.1
- from 0, < 3.9.21, >= 3.10.0, < 3.10.16, >= 3.11.0, < 3.11.11, >= 3.12.0, < 3.12.8, >= 3.13.0, < 3.13.1
- from 0, < 3.9.21, >= 3.10.0, < 3.10.16, >= 3.11.0, < 3.11.11, >= 3.12.0, < 3.12.8, >= 3.13.0, < 3.13.1
- from 0, < 7.3.5+dfsg-2+deb11u4
- from 0, < 3.11.2-6+deb12u5
- from 0, < 3.13.1-1
- from 0, < 3.9.2-1+deb11u2
CVSS scores
| Source | Version | Severity | Vector |
|---|---|---|---|
| osv | CVSS 4.0 | — | CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:Green |
| osv | CVSS 3.1 | HIGH7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |