cve.bz

CVE-2024-53899 virtualenv virtualenv: OS Command Injection

7.8 highExploit referenceEPSS 1.6%Fix available

High (7.8) in virtualenv virtualenv. EPSS 1.6% estimated probability of exploitation activity in the next 30 days. Fixed in virtualenv 20.26.6.

On this page
virtualenv before 20.26.6 allows command injection through the activation scripts for a virtual environment. Magic template strings are not quoted correctly when replacing. NOTE: this is not the same as CVE-2024-9287.

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
1.6% (unchanged from 1.6% a week ago; 1.6% 30 days ago) estimated probability of exploitation activity in the next 30 days; 76th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: total, assessed 2024-11-24. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-77 Improper Neutralization of Special Elements used in a Command
CWE-78 Improper Neutralization of Special Elements used in an OS Command (OS Command Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-53899 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-53899?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-53899?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-53899 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
virtualenv:virtualenvbefore 20.26.6

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-rqc4-2hc7-8c8vPyPIvirtualenv<20.26.620.26.6
PYSEC-2024-187PyPIvirtualenv<20.26.620.26.6

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12python-virtualenvno fix listedDEBIAN-CVE-2024-53899
Debian13, 14python-virtualenv20.26.6+ds-1DEBIAN-CVE-2024-53899
Ubuntu14.04:LTSpython-virtualenvno fix listedUBUNTU-CVE-2024-53899
UbuntuPro:20.04:LTSpython-virtualenv20.0.17-1ubuntu0.4+esm1USN-7271-1
UbuntuPro:22.04:LTSpython-virtualenv20.13.0+ds-2ubuntu0.1~esm1UBUNTU-CVE-2024-53899 USN-7271-1
UbuntuPro:24.04:LTSpython-virtualenv20.25.0+ds-2ubuntu0.1~esm1UBUNTU-CVE-2024-53899 USN-7271-2
Red Hatenterprise_linux:8::appstreampython-PyMySQL, python3-PyMySQL0:0.10.1-2.module+el8.10.0+20784+edafcd43RHSA-2024:10953
Red Hatenterprise_linux:8::appstreampython-distro, python3-distro0:1.4.0-2.module+el8.10.0+20784+edafcd43RHSA-2024:10953
Red Hatenterprise_linux:8::appstreampython-docs, python3-docs0:3.6.7-2.module+el8.10.0+20784+edafcd43RHSA-2024:10953
Red Hatenterprise_linux:8::appstreampython-docutils, python3-docutils0:0.14-12.module+el8.10.0+20784+edafcd43RHSA-2024:10953
Red Hatenterprise_linux:8::appstreampython-nose, python3-nose, python-nose-docs0:1.3.7-31.module+el8.10.0+20784+edafcd43RHSA-2024:10953
Red Hatenterprise_linux:8::appstreampython-pygments, python3-pygments0:2.2.0-22.module+el8.10.0+20784+edafcd43RHSA-2024:10953
Red Hatenterprise_linux:8::appstreampython-sqlalchemy, python3-sqlalchemy, python-sqlalchemy-doc0:1.3.2-3.module+el8.10.0+20981+3704b446RHSA-2024:10953
Red Hatenterprise_linux:8::appstreampython-virtualenv, python3-virtualenv, python-virtualenv-doc0:15.1.0-23.module+el8.10.0+22619+61b70790RHSA-2024:10953
Red Hatenterprise_linux:8::appstreampython-wheel, python3-wheel, python3-wheel-wheel1:0.31.1-3.module+el8.10.0+20784+edafcd43RHSA-2024:10953
Red Hatenterprise_linux:8::appstreampython3-bson, python-pymongo, python3-pymongo and 6 more0:3.7.0-1.module+el8.10.0+20784+edafcd43RHSA-2024:10953
Red Hatenterprise_linux:8::appstreampython36, python36-debug, python36-devel and 1 more0:3.6.8-39.module+el8.10.0+20784+edafcd43RHSA-2024:10953
Red Hatenterprise_linux:8::appstreamscipy, python3-scipy, scipy-debugsource and 1 more0:1.0.0-21.module+el8.10.0+20784+edafcd43RHSA-2024:10953
49 more for Red Hat in the JSON and on Red Hat's page.
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise Module for Python 3 15 SP5 and 3 morepython-virtualenv20.22.0-150400.9.6.1SUSE-SU-2024:4093-1
SUSELinux Enterprise Module for Development Tools 15 SP6python3-virtualenv20.17.1-150600.3.5.1SUSE-SU-2024:4143-1
openSUSELeap 15.5, Leap 15.6python-virtualenv20.22.0-150400.9.6.1SUSE-SU-2024:4093-1
openSUSELeap 15.6python3-virtualenv20.17.1-150600.3.5.1SUSE-SU-2024:4143-1
openSUSETumbleweedoci-cli3.61.0-1.1openSUSE-SU-2025:15252-1
AlmaLinux8python3-PyMySQL0.10.1-2.module_el8.9.0+3700+efebe9fdALSA-2024:10953
AlmaLinux8python3-bson, python3-pymongo, python-pymongo-doc and 1 more3.7.0-1.module_el8.9.0+3700+efebe9fdALSA-2024:10953
AlmaLinux8python3-distro1.4.0-2.module_el8.9.0+3700+efebe9fdALSA-2024:10953
AlmaLinux8python3-docs3.6.7-2.module_el8.9.0+3700+efebe9fdALSA-2024:10953
AlmaLinux8python3-docutils0.14-12.module_el8.9.0+3700+efebe9fdALSA-2024:10953
AlmaLinux8python3-nose, python-nose-docs1.3.7-31.module_el8.9.0+3700+efebe9fdALSA-2024:10953
AlmaLinux8python3-pygments2.2.0-22.module_el8.9.0+3700+efebe9fdALSA-2024:10953
AlmaLinux8python3-scipy1.0.0-21.module_el8.9.0+3700+efebe9fdALSA-2024:10953
AlmaLinux8python3-sqlalchemy, python-sqlalchemy-doc1.3.2-3.module_el8.10.0+3769+3838165bALSA-2024:10953
AlmaLinux8python3-virtualenv, python-virtualenv-doc15.1.0-23.module_el8.10.0+3937+b6a3652fALSA-2024:10953
AlmaLinux8python3-wheel, python3-wheel-wheel1:0.31.1-3.module_el8.9.0+3700+efebe9fdALSA-2024:10953
AlmaLinux8python36, python36-debug, python36-devel and 1 more3.6.8-39.module_el8.10.0+3769+3838165bALSA-2024:10953
Rocky Linux8python-PyMySQL0:0.10.1-2.module+el8.10.0+1582+bc278001RLSA-2024:10953
Rocky Linux8python-distro0:1.4.0-2.module+el8.10.0+1592+61442852RLSA-2024:10953
Rocky Linux8python-docs0:3.6.7-2.module+el8.10.0+1592+61442852RLSA-2024:10953
Rocky Linux8python-docutils0:0.14-12.module+el8.10.0+1592+61442852RLSA-2024:10953
Rocky Linux8python-nose0:1.3.7-31.module+el8.10.0+1592+61442852RLSA-2024:10953
Rocky Linux8python-pygments0:2.2.0-22.module+el8.10.0+1592+61442852RLSA-2024:10953
Rocky Linux8python-pymongo0:3.7.0-1.module+el8.10.0+1592+61442852RLSA-2024:10953
Rocky Linux8python-sqlalchemy0:1.3.2-3.module+el8.10.0+1602+b47e27faRLSA-2024:10953
Rocky Linux8python-virtualenv0:15.1.0-23.module+el8.10.0+1910+234ad790RLSA-2024:10953
Rocky Linux8python-wheel1:0.31.1-3.module+el8.10.0+1592+61442852RLSA-2024:10953
Rocky Linux8python360:3.6.8-39.module+el8.10.0+1592+61442852RLSA-2024:10953
Rocky Linux8scipy0:1.0.0-21.module+el8.10.0+1592+61442852RLSA-2024:10953
Azure Linux2python-virtualenv20.26.6-1AZL-53645
Azure Linux3python-virtualenv20.25.0-3AZL-53417
Alpaquita23py3-virtualenvno fix listedBELL-CVE-2024-53899
Alpaquitastreampy3-virtualenv20.26.6-r0BELL-CVE-2024-53899

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpaquita.

Red Hat

Red Hat rates this Important.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 7 Extended Lifecycle Supportpython-virtualenv-0:15.1.0-7.el7_9.1Fixed 2024-12-16RHSA-2024:11048
Red Hat Enterprise Linux 8python36:3.6-8100020241203074044.4c5117adFixed 2024-12-11RHSA-2024:10953
Red Hat Enterprise Linux 8.2 Advanced Update Supportpython36:3.6-8020020241213084804.606b8f18Fixed 2024-12-16RHSA-2024:11091
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Supportpython36:3.6-8040020241213073301.9bf6f064Fixed 2025-01-01RHSA-2025:0002
Red Hat Enterprise Linux 8.4 Telecommunications Update Servicepython36:3.6-8040020241213073301.9bf6f064Fixed 2025-01-01RHSA-2025:0002
Red Hat Enterprise Linux 8.4 Update Services for SAP Solutionspython36:3.6-8040020241213073301.9bf6f064Fixed 2025-01-01RHSA-2025:0002
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Supportpython36:3.6-8060020241213062726.448f2761Fixed 2024-12-16RHSA-2024:11094
Red Hat Enterprise Linux 8.6 Telecommunications Update Servicepython36:3.6-8060020241213062726.448f2761Fixed 2024-12-16RHSA-2024:11094
Red Hat Enterprise Linux 8.6 Update Services for SAP Solutionspython36:3.6-8060020241213062726.448f2761Fixed 2024-12-16RHSA-2024:11094
Red Hat Enterprise Linux 8.8 Extended Update Supportpython36:3.6-8080020241205132428.075014fcFixed 2024-12-16RHSA-2024:11093
Red Hat OpenShift Dev Spaces 3 Containersdevspaces/udi-rhel9:3.18-1Fixed 2025-02-03RHSA-2025:0892
OpenShift Lightspeedopenshift-lightspeed-tech-preview/lightspeed-service-api-rhel9Affected
Red Hat OpenShift Container Platform 4python-virtualenvNot affected
Red Hat OpenShift Dev Spacesdevspaces/traefik-rhel8Not affected
Red Hat Satellite 6python-virtualenvNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-53899.

Attack patterns (CAPEC)

  • CAPEC-6 Argument Injection Likelihood: High · Severity: High
  • CAPEC-15 Command Delimiters Likelihood: High · Severity: High
  • CAPEC-43 Exploiting Multiple Input Interpretation Layers Likelihood: Medium · Severity: High
  • CAPEC-88 OS Command Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High
  • CAPEC-40 Manipulating Writeable Terminal Devices Likelihood: High · Severity: Very High
  • CAPEC-75 Manipulating Writeable Configuration Files Likelihood: High · Severity: Very High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-136 LDAP Injection Likelihood: High · Severity: High
  • CAPEC-183 IMAP/SMTP Command Injection Severity: Medium

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-77.

References

Check your stackJSON