Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

redhat логотип

CVE-2024-9287

Опубликовано: 22 окт. 2024
Источник: redhat
CVSS3: 6.3
EPSS Низкий

Описание

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.

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.

Отчет

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. Within regulated environments, a combination of the following controls acts as a significant barrier to successfully exploiting a CWE-428: Unquoted Search Path or Element vulnerability and therefore downgrades the severity of this particular CVE from Moderate to Low. Platform workloads run with restricted privileges in minimal, tightly controlled runtime environments, following best practices such as non-root container execution, read-only file systems, and hardened base images to reduce the risk of path manipulation. The environment employs IPS/IDS and antimalware solutions to detect and respond to threats in real time, limiting exploitation attempts. Event logs are centrally collected and analyzed to support monitoring, alerting, and detection of input-based manipulation. Static code analysis and peer reviews enforce strong input validation and error handling, preventing poorly validated inputs from causing instability, data exposure, or privilege escalation. In the event of exploitation, process isolation contains the impact within the compromised component, preventing it from affecting other processes or the broader system.

Меры по смягчению последствий

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.

Затронутые пакеты

ПлатформаПакетСостояниеРекомендацияРелиз
Red Hat Enterprise Linux 10python3.12Not affected
Red Hat Enterprise Linux 7pythonOut of support scope
Red Hat Enterprise Linux 7python3Out of support scope
Red Hat Enterprise Linux 8python36:3.6/python36Not affected
Red Hat Enterprise Linux 8python39:3.9/python39Not affected
Red Hat Enterprise Linux 8python3FixedRHSA-2024:1077904.12.2024
Red Hat Enterprise Linux 8python3.11FixedRHSA-2024:1097912.12.2024
Red Hat Enterprise Linux 8python3.12FixedRHSA-2024:1098012.12.2024
Red Hat Enterprise Linux 8python3FixedRHSA-2024:1077904.12.2024
Red Hat Enterprise Linux 9python3.12FixedRHSA-2024:1097812.12.2024

Показывать по

Дополнительная информация

Статус:

Moderate
Дефект:
CWE-428
https://bugzilla.redhat.com/show_bug.cgi?id=2321440python: Virtual environment (venv) activation scripts don't quote paths

EPSS

Процентиль: 10%
0.00038
Низкий

6.3 Medium

CVSS3

Связанные уязвимости

CVSS3: 7.8
ubuntu
8 месяцев назад

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.

CVSS3: 7.8
nvd
8 месяцев назад

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.

CVSS3: 7.8
msrc
3 месяца назад

Описание отсутствует

CVSS3: 7.8
debian
8 месяцев назад

A vulnerability has been found in the CPython `venv` module and CLI wh ...

suse-cvrf
5 месяцев назад

Security update for python312

EPSS

Процентиль: 10%
0.00038
Низкий

6.3 Medium

CVSS3