CVE-2024-9287

Description

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.

Statement

This vulnerability in the Python venv module is rated as moderate rather than important because it relies on a specific set of conditions to be exploitable, limiting its impact. An attacker would need to have control over the virtual environment creation process and access to the environment setup, which is less common in typical usage scenarios. Furthermore, the vulnerability only poses a risk if users activate the malicious virtual environment through source venv/bin/activate or similar scripts, as direct invocation of the virtual environment without activation (./venv/bin/python) is not affected.

Versions of python36:3.6/python36 and python39:3.9/python39 as shipped with Red Hat Enterprise Linux 8 are marked as 'Not affected' as they just provide "symlinks" to the main python3 component, which provides the actual interpreter of the Python programming language.

Mitigation

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

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score6.37.8N/A
Attack VectorLocalLocalN/A
Attack ComplexityLowLowN/A
Privileges RequiredHighLowN/A
User InteractionRequiredNoneN/A
ScopeChangedUnchangedN/A
ConfidentialityLowHighN/A
Integrity ImpactHighHighN/A
Availability ImpactNoneHighN/A

Vector

Red Hat: CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:L/I:H/A:N

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

Understanding the Weakness (CWE)

Confidentiality,Integrity,Availability

Technical Impact: Execute Unauthorized Code or Commands

Frequently Asked Questions

Want to get errata notifications? Sign up here.