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.
Upstream issue: https://github.com/python/cpython/issues/124651 The fix has already been merged into 3.11+, PRs for 3.10 and 3.9 are waiting and all versions should get a security release after that.
This issue has been addressed in the following products: Red Hat Enterprise Linux 8 Via RHSA-2024:10779 https://access.redhat.com/errata/RHSA-2024:10779
This issue has been addressed in the following products: Red Hat Enterprise Linux 9 Via RHSA-2024:10978 https://access.redhat.com/errata/RHSA-2024:10978
This issue has been addressed in the following products: Red Hat Enterprise Linux 8 Via RHSA-2024:10979 https://access.redhat.com/errata/RHSA-2024:10979
This issue has been addressed in the following products: Red Hat Enterprise Linux 8 Via RHSA-2024:10980 https://access.redhat.com/errata/RHSA-2024:10980
This issue has been addressed in the following products: Red Hat Enterprise Linux 9 Via RHSA-2024:10983 https://access.redhat.com/errata/RHSA-2024:10983
This issue has been addressed in the following products: Red Hat Enterprise Linux 9.4 Extended Update Support Via RHSA-2024:11024 https://access.redhat.com/errata/RHSA-2024:11024
This issue has been addressed in the following products: Red Hat Enterprise Linux 9.4 Extended Update Support Via RHSA-2024:11035 https://access.redhat.com/errata/RHSA-2024:11035
This issue has been addressed in the following products: Red Hat Enterprise Linux 9 Via RHSA-2024:11111 https://access.redhat.com/errata/RHSA-2024:11111
This issue has been addressed in the following products: Red Hat Enterprise Linux 9.4 Extended Update Support Via RHSA-2025:0280 https://access.redhat.com/errata/RHSA-2025:0280