Local Command Injection Vulnerability in python-virtualenv Package

python-virtualenv Updated 03 Oct 2025

Summary

24/11/2024
N/A
No i
High
8.4

UBUNTU-CVE-2024-53899: virtualenv before 20.26.6 allows command injection through the activation scripts for a virtual environment. Affects python-virtualenv versions 1.10.1-1 – 1.11.4-1ubuntu1. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The python-virtualenv package is a tool that allows users to create isolated Python environments. This is particularly useful for managing dependencies for different projects without conflicts. The package is widely used in various Ubuntu distributions, including LTS versions. However, it has been found to have a significant vulnerability that can lead to local command injection, potentially compromising the security of systems using it.

Vulnerability Detail

The vulnerability identified as CVE-2024-53899 affects versions of virtualenv prior to 20.26.6. It allows for command injection through the activation scripts of a virtual environment due to improper quoting of magic template strings during replacement. This can lead to unauthorized command execution, which poses a serious risk to the integrity and confidentiality of the system. The vulnerability has a CVSS score of 8.4, indicating a high severity level.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, users can avoid using the activation scripts until the package is updated. This can be done by manually managing the environment variables required for the virtual environment without relying on the provided scripts.

Conclusion

The python-virtualenv package has a critical vulnerability (CVE-2024-53899) that allows local command injection due to improper handling of activation scripts. Users are strongly advised to update to the latest version to mitigate risks. For those unable to update immediately, a temporary workaround is available.

See every vulnerability recorded for python-virtualenv →

Share this vulnerability

FAQ

CVE-2024-53899 is a vulnerability in the python-virtualenv package that allows for local command injection through improperly handled activation scripts.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

If exploited, this vulnerability can lead to unauthorized command execution, which may compromise system security and data integrity.

Yes, a patched version of python-virtualenv is available. Users should update to version 20.26.6 or later.

If an immediate update is not possible, consider using the workaround of manually managing environment variables without relying on the activation scripts.

Related vulnerabilities

Recent vulnerabilities recorded for python-virtualenv.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback