CVE-2024-9287

HIGH
Published Oct 22, 2024 Modified Nov 3, 2025 CWE-428 CWE-77

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.

Is your site exposed to CVE-2024-9287?

Run a free security scan — no signup, results in seconds.

CVSS v3.1 Score

7.8
HIGH
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Weakness Type (CWE)

CWE-428 CWE-428
CWE-77 CWE-77

Affected Products

Vendor Product
python python
python python
python python
python python
python python
python python

References

Frequently Asked Questions

What is CVE-2024-9287? +
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. It has a CVSS v3.1 base score of 7.8 (HIGH).
How severe is CVE-2024-9287? +
CVE-2024-9287 has a CVSS v3.1 score of 7.8 out of 10, rated HIGH. This is a high-severity vulnerability that should be prioritized for patching.
What products are affected by CVE-2024-9287? +
CVE-2024-9287 affects products from python, specifically: python. Check the affected products table above for specific version ranges.
How do I check if I'm vulnerable to CVE-2024-9287? +
You can use Secably's free Website Scanner to check your website for known vulnerabilities. For infrastructure scanning, use the Port Scanner to identify exposed services that may be affected. Check the vendor advisories linked above for specific patch and version information.

Related Vulnerabilities

Don't wait for an exploit

Scan your website for vulnerabilities like CVE-2024-9287 — free, no signup required.