Skip to content
OpenAdvisories
High · 8.4 CVE-2024-53899 BIT-virtualenv-2024-53899EUVD-2024-0172GHSA-rqc4-2hc7-8c8vPYSEC-2024-187

virtualenv allows command injection through activation scripts for a virtual environment

Published Nov 24, 2024 · Updated Nov 24, 2024 · Assigned by mitre

Description

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.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 python-virtualenv 20.26.6+ds-1 —
Debian 13 python-virtualenv 20.26.6+ds-1 —
Debian 12 python-virtualenv No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 14.04 LTS python-virtualenv No fix yet —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 24.04 LTS python-virtualenv 20.25.0+ds-2ubuntu0.1~esm1 USN-7271-2
Ubuntu Pro 22.04 LTS python-virtualenv 20.13.0+ds-2ubuntu0.1~esm1 USN-7271-1
Ubuntu Pro 20.04 LTS python-virtualenv 20.0.17-1ubuntu0.4+esm1 USN-7271-1
ReleasePackageFixed inAdvisory
RHEL 8 python-PyMySQL +1 0.10.1-2.module+el8.10.0+20784+edafcd43 RHSA-2024:10953
RHEL 8 python-distro +1 1.4.0-2.module+el8.10.0+20784+edafcd43 RHSA-2024:10953
RHEL 8 python-docs +1 3.6.7-2.module+el8.10.0+20784+edafcd43 RHSA-2024:10953
RHEL 8 python-docutils +1 0.14-12.module+el8.10.0+20784+edafcd43 RHSA-2024:10953
RHEL 8 python-nose +2 1.3.7-31.module+el8.10.0+20784+edafcd43 RHSA-2024:10953
RHEL 8 python-pygments +1 2.2.0-22.module+el8.10.0+20784+edafcd43 RHSA-2024:10953
RHEL 8 python-sqlalchemy +2 1.3.2-3.module+el8.10.0+20981+3704b446 RHSA-2024:10953
RHEL 8 python-virtualenv +2 15.1.0-23.module+el8.10.0+22619+61b70790 RHSA-2024:10953
RHEL 8 python-wheel +2 1:0.31.1-3.module+el8.10.0+20784+edafcd43 RHSA-2024:10953
RHEL 8 python3-bson +4 3.7.0-1.module+el8.10.0+20784+edafcd43 RHSA-2024:10953
RHEL 8 python36 +3 3.6.8-39.module+el8.10.0+20784+edafcd43 RHSA-2024:10953
RHEL 8 scipy +1 1.0.0-21.module+el8.10.0+20784+edafcd43 RHSA-2024:10953
Show 9 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
RHEL 8.8 EUS python-PyMySQL +1 0.10.1-2.module+el8.4.0+9657+a4b6a102 RHSA-2024:11093
RHEL 8.8 EUS python-distro +1 1.4.0-2.module+el8.1.0+3334+5cb623d7 RHSA-2024:11093
RHEL 8.8 EUS python-docs +1 3.6.7-2.module+el8.1.0+3334+5cb623d7 RHSA-2024:11093
RHEL 8.8 EUS python-docutils +1 0.14-12.module+el8.1.0+3334+5cb623d7 RHSA-2024:11093
RHEL 8.8 EUS python-nose +2 1.3.7-31.module+el8.5.0+12207+5c5719bc RHSA-2024:11093
RHEL 8.8 EUS python-pygments +1 2.2.0-22.module+el8.5.0+10789+e4939b94 RHSA-2024:11093
RHEL 8.8 EUS python-sqlalchemy +2 1.3.2-2.module+el8.8.0+20977+39d98680.1 RHSA-2024:11093
RHEL 8.8 EUS python-virtualenv +2 15.1.0-22.module+el8.8.0+22625+4a966c0c.1 RHSA-2024:11093
RHEL 8.8 EUS python-wheel +2 1:0.31.1-3.module+el8.5.0+12207+5c5719bc RHSA-2024:11093
RHEL 8.8 EUS python3-bson +4 3.7.0-1.module+el8.4.0+9670+1849b5f9 RHSA-2024:11093
RHEL 8.8 EUS python36 +3 3.6.8-38.module+el8.5.0+12207+5c5719bc RHSA-2024:11093
RHEL 8.8 EUS scipy +1 1.0.0-21.module+el8.5.0+10916+41bd434d RHSA-2024:11093
RHEL 8.6 TUS python-PyMySQL +1 0.10.1-2.module+el8.4.0+9657+a4b6a102 RHSA-2024:11094
RHEL 8.6 TUS python-distro +1 1.4.0-2.module+el8.1.0+3334+5cb623d7 RHSA-2024:11094
RHEL 8.6 TUS python-docs +1 3.6.7-2.module+el8.1.0+3334+5cb623d7 RHSA-2024:11094
RHEL 8.6 TUS python-docutils +1 0.14-12.module+el8.1.0+3334+5cb623d7 RHSA-2024:11094
RHEL 8.6 TUS python-nose +2 1.3.7-31.module+el8.5.0+12207+5c5719bc RHSA-2024:11094
RHEL 8.6 TUS python-pygments +1 2.2.0-22.module+el8.5.0+10789+e4939b94 RHSA-2024:11094
RHEL 8.6 TUS python-sqlalchemy +2 1.3.2-2.module+el8.6.0+20978+2ad18ee0.1 RHSA-2024:11094
RHEL 8.6 TUS python-virtualenv +2 15.1.0-21.module+el8.6.0+22648+901a012d.2 RHSA-2024:11094
RHEL 8.6 TUS python-wheel +2 1:0.31.1-3.module+el8.5.0+12207+5c5719bc RHSA-2024:11094
RHEL 8.6 TUS python3-bson +4 3.7.0-1.module+el8.4.0+9670+1849b5f9 RHSA-2024:11094
RHEL 8.6 TUS python36 +3 3.6.8-38.module+el8.5.0+12207+5c5719bc RHSA-2024:11094
RHEL 8.6 TUS scipy +1 1.0.0-21.module+el8.5.0+10916+41bd434d RHSA-2024:11094
RHEL 8.6 E4S python-PyMySQL +1 0.10.1-2.module+el8.4.0+9657+a4b6a102 RHSA-2024:11094
RHEL 8.6 E4S python-distro +1 1.4.0-2.module+el8.1.0+3334+5cb623d7 RHSA-2024:11094
RHEL 8.6 E4S python-docs +1 3.6.7-2.module+el8.1.0+3334+5cb623d7 RHSA-2024:11094
RHEL 8.6 E4S python-docutils +1 0.14-12.module+el8.1.0+3334+5cb623d7 RHSA-2024:11094
RHEL 8.6 E4S python-nose +2 1.3.7-31.module+el8.5.0+12207+5c5719bc RHSA-2024:11094
RHEL 8.6 E4S python-pygments +1 2.2.0-22.module+el8.5.0+10789+e4939b94 RHSA-2024:11094
RHEL 8.6 E4S python-sqlalchemy +2 1.3.2-2.module+el8.6.0+20978+2ad18ee0.1 RHSA-2024:11094
RHEL 8.6 E4S python-virtualenv +2 15.1.0-21.module+el8.6.0+22648+901a012d.2 RHSA-2024:11094
RHEL 8.6 E4S python-wheel +2 1:0.31.1-3.module+el8.5.0+12207+5c5719bc RHSA-2024:11094
RHEL 8.6 E4S python3-bson +4 3.7.0-1.module+el8.4.0+9670+1849b5f9 RHSA-2024:11094
RHEL 8.6 E4S python36 +3 3.6.8-38.module+el8.5.0+12207+5c5719bc RHSA-2024:11094
RHEL 8.6 E4S scipy +1 1.0.0-21.module+el8.5.0+10916+41bd434d RHSA-2024:11094
RHEL 8.6 AUS python-PyMySQL +1 0.10.1-2.module+el8.4.0+9657+a4b6a102 RHSA-2024:11094
RHEL 8.6 AUS python-distro +1 1.4.0-2.module+el8.1.0+3334+5cb623d7 RHSA-2024:11094
RHEL 8.6 AUS python-docs +1 3.6.7-2.module+el8.1.0+3334+5cb623d7 RHSA-2024:11094
RHEL 8.6 AUS python-docutils +1 0.14-12.module+el8.1.0+3334+5cb623d7 RHSA-2024:11094
RHEL 8.6 AUS python-nose +2 1.3.7-31.module+el8.5.0+12207+5c5719bc RHSA-2024:11094
RHEL 8.6 AUS python-pygments +1 2.2.0-22.module+el8.5.0+10789+e4939b94 RHSA-2024:11094
RHEL 8.6 AUS python-sqlalchemy +2 1.3.2-2.module+el8.6.0+20978+2ad18ee0.1 RHSA-2024:11094
RHEL 8.6 AUS python-virtualenv +2 15.1.0-21.module+el8.6.0+22648+901a012d.2 RHSA-2024:11094
RHEL 8.6 AUS python-wheel +2 1:0.31.1-3.module+el8.5.0+12207+5c5719bc RHSA-2024:11094
RHEL 8.6 AUS python3-bson +4 3.7.0-1.module+el8.4.0+9670+1849b5f9 RHSA-2024:11094
RHEL 8.6 AUS python36 +3 3.6.8-38.module+el8.5.0+12207+5c5719bc RHSA-2024:11094
RHEL 8.6 AUS scipy +1 1.0.0-21.module+el8.5.0+10916+41bd434d RHSA-2024:11094
RHEL 8.4 TUS python-PyMySQL +1 0.10.1-2.module+el8.4.0+9657+a4b6a102 RHSA-2025:0002
RHEL 8.4 TUS python-distro +1 1.4.0-2.module+el8.1.0+3334+5cb623d7 RHSA-2025:0002
RHEL 8.4 TUS python-docs +1 3.6.7-2.module+el8.1.0+3334+5cb623d7 RHSA-2025:0002
RHEL 8.4 TUS python-docutils +1 0.14-12.module+el8.1.0+3334+5cb623d7 RHSA-2025:0002
RHEL 8.4 TUS python-nose +2 1.3.7-30.module+el8.4.0+15040+36b018e7.1 RHSA-2025:0002
RHEL 8.4 TUS python-pygments +1 2.2.0-20.module+el8.1.0+3334+5cb623d7 RHSA-2025:0002
RHEL 8.4 TUS python-sqlalchemy +2 1.3.2-2.module+el8.4.0+20979+8ba06d83.1 RHSA-2025:0002
RHEL 8.4 TUS python-virtualenv +2 15.1.0-19.module+el8.4.0+22650+01781d50.3 RHSA-2025:0002
RHEL 8.4 TUS python-wheel +2 1:0.31.1-2.module+el8.4.0+15040+36b018e7.1 RHSA-2025:0002
RHEL 8.4 TUS python3-bson +4 3.7.0-1.module+el8.4.0+9670+1849b5f9 RHSA-2025:0002
RHEL 8.4 TUS python36 +3 3.6.8-2.module+el8.4.0+15040+36b018e7.1 RHSA-2025:0002
RHEL 8.4 TUS scipy +1 1.0.0-20.module+el8.1.0+3334+5cb623d7 RHSA-2025:0002
RHEL 8.4 E4S python-PyMySQL +1 0.10.1-2.module+el8.4.0+9657+a4b6a102 RHSA-2025:0002
RHEL 8.4 E4S python-distro +1 1.4.0-2.module+el8.1.0+3334+5cb623d7 RHSA-2025:0002
RHEL 8.4 E4S python-docs +1 3.6.7-2.module+el8.1.0+3334+5cb623d7 RHSA-2025:0002
RHEL 8.4 E4S python-docutils +1 0.14-12.module+el8.1.0+3334+5cb623d7 RHSA-2025:0002
RHEL 8.4 E4S python-nose +2 1.3.7-30.module+el8.4.0+15040+36b018e7.1 RHSA-2025:0002
RHEL 8.4 E4S python-pygments +1 2.2.0-20.module+el8.1.0+3334+5cb623d7 RHSA-2025:0002
RHEL 8.4 E4S python-sqlalchemy +2 1.3.2-2.module+el8.4.0+20979+8ba06d83.1 RHSA-2025:0002
RHEL 8.4 E4S python-virtualenv +2 15.1.0-19.module+el8.4.0+22650+01781d50.3 RHSA-2025:0002
RHEL 8.4 E4S python-wheel +2 1:0.31.1-2.module+el8.4.0+15040+36b018e7.1 RHSA-2025:0002
RHEL 8.4 E4S python3-bson +4 3.7.0-1.module+el8.4.0+9670+1849b5f9 RHSA-2025:0002
RHEL 8.4 E4S python36 +3 3.6.8-2.module+el8.4.0+15040+36b018e7.1 RHSA-2025:0002
RHEL 8.4 E4S scipy +1 1.0.0-20.module+el8.1.0+3334+5cb623d7 RHSA-2025:0002
RHEL 8.4 AUS python-PyMySQL +1 0.10.1-2.module+el8.4.0+9657+a4b6a102 RHSA-2025:0002
RHEL 8.4 AUS python-distro +1 1.4.0-2.module+el8.1.0+3334+5cb623d7 RHSA-2025:0002
RHEL 8.4 AUS python-docs +1 3.6.7-2.module+el8.1.0+3334+5cb623d7 RHSA-2025:0002
RHEL 8.4 AUS python-docutils +1 0.14-12.module+el8.1.0+3334+5cb623d7 RHSA-2025:0002
RHEL 8.4 AUS python-nose +2 1.3.7-30.module+el8.4.0+15040+36b018e7.1 RHSA-2025:0002
RHEL 8.4 AUS python-pygments +1 2.2.0-20.module+el8.1.0+3334+5cb623d7 RHSA-2025:0002
RHEL 8.4 AUS python-sqlalchemy +2 1.3.2-2.module+el8.4.0+20979+8ba06d83.1 RHSA-2025:0002
RHEL 8.4 AUS python-virtualenv +2 15.1.0-19.module+el8.4.0+22650+01781d50.3 RHSA-2025:0002
RHEL 8.4 AUS python-wheel +2 1:0.31.1-2.module+el8.4.0+15040+36b018e7.1 RHSA-2025:0002
RHEL 8.4 AUS python3-bson +4 3.7.0-1.module+el8.4.0+9670+1849b5f9 RHSA-2025:0002
RHEL 8.4 AUS python36 +3 3.6.8-2.module+el8.4.0+15040+36b018e7.1 RHSA-2025:0002
RHEL 8.4 AUS scipy +1 1.0.0-20.module+el8.1.0+3334+5cb623d7 RHSA-2025:0002
RHEL 8.2 AUS python-PyMySQL +1 0.8.0-10.module+el8.1.0+3334+5cb623d7 RHSA-2024:11091
RHEL 8.2 AUS python-distro +1 1.4.0-2.module+el8.1.0+3334+5cb623d7 RHSA-2024:11091
RHEL 8.2 AUS python-docs +1 3.6.7-2.module+el8.1.0+3334+5cb623d7 RHSA-2024:11091
RHEL 8.2 AUS python-docutils +1 0.14-12.module+el8.1.0+3334+5cb623d7 RHSA-2024:11091
RHEL 8.2 AUS python-nose +2 1.3.7-30.module+el8.1.0+3334+5cb623d7 RHSA-2024:11091
RHEL 8.2 AUS python-pygments +1 2.2.0-20.module+el8.1.0+3334+5cb623d7 RHSA-2024:11091
RHEL 8.2 AUS python-sqlalchemy +2 1.3.2-1.module+el8.1.0+3334+5cb623d7 RHSA-2024:11091
RHEL 8.2 AUS python-virtualenv +2 15.1.0-19.module+el8.2.0+22651+db2d74c8.2 RHSA-2024:11091
RHEL 8.2 AUS python-wheel +2 1:0.31.1-2.module+el8.1.0+3724+3c097090 RHSA-2024:11091
RHEL 8.2 AUS python3-bson +4 3.6.1-11.module+el8.1.0+3334+5cb623d7 RHSA-2024:11091
RHEL 8.2 AUS python36 +3 3.6.8-2.module+el8.1.0+3334+5cb623d7 RHSA-2024:11091
RHEL 8.2 AUS scipy +1 1.0.0-20.module+el8.1.0+3334+5cb623d7 RHSA-2024:11091
RHEL 7 ELS python-virtualenv 15.1.0-7.el7_9.1 RHSA-2024:11048

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 8 python3-PyMySQL 0.10.1-2.module_el8.9.0+3700+efebe9fd ALSA-2024:10953
AlmaLinux 8 python3-bson +3 3.7.0-1.module_el8.9.0+3700+efebe9fd ALSA-2024:10953
AlmaLinux 8 python3-distro 1.4.0-2.module_el8.9.0+3700+efebe9fd ALSA-2024:10953
AlmaLinux 8 python3-docs 3.6.7-2.module_el8.9.0+3700+efebe9fd ALSA-2024:10953
AlmaLinux 8 python3-docutils 0.14-12.module_el8.9.0+3700+efebe9fd ALSA-2024:10953
AlmaLinux 8 python3-nose +1 1.3.7-31.module_el8.9.0+3700+efebe9fd ALSA-2024:10953
AlmaLinux 8 python3-pygments 2.2.0-22.module_el8.9.0+3700+efebe9fd ALSA-2024:10953
AlmaLinux 8 python3-scipy 1.0.0-21.module_el8.9.0+3700+efebe9fd ALSA-2024:10953
AlmaLinux 8 python3-sqlalchemy +1 1.3.2-3.module_el8.10.0+3769+3838165b ALSA-2024:10953
AlmaLinux 8 python3-virtualenv +1 15.1.0-23.module_el8.10.0+3937+b6a3652f ALSA-2024:10953
AlmaLinux 8 python3-wheel +1 1:0.31.1-3.module_el8.9.0+3700+efebe9fd ALSA-2024:10953
AlmaLinux 8 python36 +3 3.6.8-39.module_el8.10.0+3769+3838165b ALSA-2024:10953

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 8 python-PyMySQL 0.10.1-2.module+el8.10.0+1582+bc278001 RLSA-2024:10953
Rocky Linux 8 python-distro 1.4.0-2.module+el8.10.0+1592+61442852 RLSA-2024:10953
Rocky Linux 8 python-docs 3.6.7-2.module+el8.10.0+1592+61442852 RLSA-2024:10953
Rocky Linux 8 python-docutils 0.14-12.module+el8.10.0+1592+61442852 RLSA-2024:10953
Rocky Linux 8 python-nose 1.3.7-31.module+el8.10.0+1592+61442852 RLSA-2024:10953
Rocky Linux 8 python-pygments 2.2.0-22.module+el8.10.0+1592+61442852 RLSA-2024:10953
Rocky Linux 8 python-pymongo 3.7.0-1.module+el8.10.0+1592+61442852 RLSA-2024:10953
Rocky Linux 8 python-sqlalchemy 1.3.2-3.module+el8.10.0+1602+b47e27fa RLSA-2024:10953
Rocky Linux 8 python-virtualenv 15.1.0-23.module+el8.10.0+1910+234ad790 RLSA-2024:10953
Rocky Linux 8 python-wheel 1:0.31.1-3.module+el8.10.0+1592+61442852 RLSA-2024:10953
Rocky Linux 8 python36 3.6.8-39.module+el8.10.0+1592+61442852 RLSA-2024:10953
Rocky Linux 8 scipy 1.0.0-21.module+el8.10.0+1592+61442852 RLSA-2024:10953
ReleasePackageFixed inAdvisory
SLES 15 SP6 python3-virtualenv 20.17.1-150600.3.5.1 SUSE-SU-2024:4143-1
SLES 15 SP4 python-virtualenv 20.22.0-150400.9.6.1 SUSE-SU-2024:4093-1
SLES 3 python-virtualenv 20.22.0-150400.9.6.1 SUSE-SU-2024:4093-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 15 SP4 python-virtualenv 20.22.0-150400.9.6.1 SUSE-SU-2024:4093-1
SLE HPC 15 SP4 python-virtualenv 20.22.0-150400.9.6.1 SUSE-SU-2024:4093-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed oci-cli 3.61.0-1.1 openSUSE-SU-2025:15252-1
openSUSE Leap 15.6 python-virtualenv 20.22.0-150400.9.6.1 SUSE-SU-2024:4093-1
openSUSE Leap 15.6 python3-virtualenv 20.17.1-150600.3.5.1 SUSE-SU-2024:4143-1
openSUSE Leap 15.5 python-virtualenv 20.22.0-150400.9.6.1 SUSE-SU-2024:4093-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 python3-virtualenv 20.4.0-3.amzn2023.0.4 ALAS2023-2025-831

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 python-virtualenv 20.25.0-3 —
Azure Linux 2 (CBL-Mariner) python-virtualenv 20.26.6-1 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 8 python3-PyMySQL 0.10.1-2.module+el8.10.0+90473+c30184f9 ELSA-2024-10953
Oracle Linux 8 python3-bson +3 3.7.0-1.module+el8.10.0+90473+c30184f9 ELSA-2024-10953
Oracle Linux 8 python3-distro 1.4.0-2.module+el8.10.0+90473+c30184f9 ELSA-2024-10953
Oracle Linux 8 python3-docs 3.6.7-2.module+el8.10.0+90473+c30184f9 ELSA-2024-10953
Oracle Linux 8 python3-docutils 0.14-12.module+el8.10.0+90473+c30184f9 ELSA-2024-10953
Oracle Linux 8 python3-nose +1 1.3.7-31.module+el8.10.0+90473+c30184f9 ELSA-2024-10953
Oracle Linux 8 python3-pygments 2.2.0-22.module+el8.10.0+90473+c30184f9 ELSA-2024-10953
Oracle Linux 8 python3-scipy 1.0.0-21.module+el8.10.0+90473+c30184f9 ELSA-2024-10953
Oracle Linux 8 python3-sqlalchemy +1 1.3.2-3.module+el8.10.0+90473+c30184f9 ELSA-2024-10953
Oracle Linux 8 python3-virtualenv +1 15.1.0-23.module+el8.10.0+90473+c30184f9 ELSA-2024-10953
Oracle Linux 8 python3-wheel +1 1:0.31.1-3.module+el8.10.0+90473+c30184f9 ELSA-2024-10953
Oracle Linux 8 python36 +3 3.6.8-39.module+el8.10.0+90473+c30184f9 ELSA-2024-10953
Oracle Linux 7 python-virtualenv 15.1.0-7.0.1.el7_9 ELSA-2024-11048

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling py3-cassandra-medusa +1 0.23.0-r0 —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI virtualenv < 20.26.6 20.26.6 GHSA-rqc4-2hc7-8c8v

Advisories 17

References