SB2026112346 - Multiple vulnerabilities in py3-virtualenv



SB2026112346 - Multiple vulnerabilities in py3-virtualenv

Published: November 23, 2026

Security Bulletin ID SB2026112346
CSH Severity
Medium
Patch available
YES
Number of vulnerabilities 24
Exploitation vector Local access
Highest impact Code execution

Breakdown by Severity

Medium 4% Low 96%
  • Low
  • Medium
  • High
  • Critical

Description

This security bulletin contains information about 24 vulnerabilities.


1) Untrusted search path (CVE-ID: N/A)

CWE-ID: CWE-426 - Untrusted Search Path

CVSSv4: 1 [CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a local user to execute code with the permissions of the user invoking virtualenv.

The vulnerability exists due to an untrusted search path in virtualenv's default configuration and cache path resolution when HOME is unset and the invoking user has no account database entry. A local user can supply project-controlled configuration in an untrusted checkout to cause virtualenv to execute a working-tree interpreter when the victim runs virtualenv there.


2) OS Command Injection (CVE-ID: N/A)

CWE-ID: CWE-78 - Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

CVSSv4: 5.4 [CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]


The vulnerability allows a local user to execute commands with the permissions of the user who sources a leftover activation script.

The vulnerability exists due to improper neutralization of shell metacharacters in stock activation scripts that the stdlib venv creator can leave behind when activation script generation is excluded or skipped for a shell. A local user can control the environment path to cause command execution if another user sources one of those scripts.


3) Incorrect permission assignment for critical resource (CVE-ID: N/A)

CWE-ID: CWE-732 - Incorrect Permission Assignment for Critical Resource

CVSSv4: 5.4 [CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]


The vulnerability allows a local user to execute code with the cache owner's privileges.

The vulnerability exists due to incorrect permission assignment in virtualenv's app-data cache migration when moving a legacy POSIX cache exposes group-writable seed files previously protected by a private parent directory. A local user can modify cached seed packages as a member of the cache's group to execute code with the cache owner's privileges when the owner creates a virtual environment that uses those packages.


4) Inappropriate Encoding for Output Context (CVE-ID: N/A)

CWE-ID: CWE-838 - Inappropriate Encoding for Output Context

CVSSv4: 5.4 [CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]


The vulnerability allows a local user to execute arbitrary commands with the privileges of the user who activates the virtual environment.

The vulnerability exists due to improper escaping of prompt text in the virtualenv Bash activator when Bash renders an interactive prompt under a legacy multibyte locale such as GBK. A local user can supply untrusted project prompt text that the victim accepts to execute commands when the victim activates the environment and Bash displays the prompt.


5) Improper Handling of Unicode Encoding (CVE-ID: N/A)

CWE-ID: CWE-176 - Improper Handling of Unicode Encoding

CVSSv4: 1 [CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a local user to cause a child process to run an unintended program.

The vulnerability exists due to improper handling of Unicode encoding in virtualenv's csh activation script when the tcsh locale changes from UTF-8 to C after activation of an environment with a non-ASCII path. A local user can use control of an unintended relative directory in the inherited PATH to influence which program a child process runs.


6) Interpretation Conflict (CVE-ID: N/A)

CWE-ID: CWE-436 - Interpretation Conflict

CVSSv4: 5.4 [CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]


The vulnerability allows a local user to execute arbitrary code with the permissions of another user who runs an affected script.

The vulnerability exists due to an interpretation conflict in virtualenv's seeded script launchers when xonsh on POSIX resolves an interpreter path containing shell quoting characters. A local user can exploit the unintended interpreter selection when another user invokes a seeded script to run code with that user's permissions.


7) Incorrect permission assignment for critical resource (CVE-ID: N/A)

CWE-ID: CWE-732 - Incorrect Permission Assignment for Critical Resource

CVSSv4: 5.3 [CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a local user to execute code as the cache owner in a later private virtual environment.

The vulnerability exists due to incorrect permission assignment in virtualenv's default POSIX cache when an existing or reset cache remains writable by a shared group under the owner's umask. A local user can tamper with cached seed packages to execute code when the cache owner later uses a private environment seeded from that cache.


8) Inappropriate Encoding for Output Context (CVE-ID: N/A)

CWE-ID: CWE-838 - Inappropriate Encoding for Output Context

CVSSv4: 1 [CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a local user to execute shell commands with the privileges of the user activating the virtual environment.

The vulnerability exists due to inappropriate output encoding in virtualenv's tcsh activation script when tcsh interprets part of a generated non-ASCII prompt as shell syntax under a Big5-HKSCS locale. A local user can control the activation prompt to execute shell commands when another user sources the generated script.


9) Incorrect permission assignment for critical resource (CVE-ID: N/A)

CWE-ID: CWE-732 - Incorrect Permission Assignment for Critical Resource

CVSSv4: 1 [CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a local user to read private seed-package files, potentially exposing content from a custom wheel.

The vulnerability exists due to incorrect file permission assignment in virtualenv's symlink seeder when it makes a new seed image read-only during POSIX environment creation. A local user can read files exposed by the overly permissive seed image if the cache or linked files are reachable from their account.


10) Code Injection (CVE-ID: N/A)

CWE-ID: CWE-94 - Improper Control of Generation of Code ('Code Injection')

CVSSv4: 5.4 [CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]


The vulnerability allows a local user to execute arbitrary Python code with the privileges of the user activating the virtual environment.

The vulnerability exists due to improper separation of prompt text from executable code in the generated xonsh activation script when xonsh decodes the script as UTF-7. A local user can supply untrusted prompt text that xonsh interprets as code during activation to execute Python code with the activating user's privileges.


11) Inappropriate Encoding for Output Context (CVE-ID: N/A)

CWE-ID: CWE-838 - Inappropriate Encoding for Output Context

CVSSv4: 5.4 [CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]


The vulnerability allows a local user to execute arbitrary shell commands with the privileges of the user activating the virtual environment.

The vulnerability exists due to inappropriate output encoding in virtualenv's Bash activation script generator when embedding a Unicode prompt in the script. A local user can influence the prompt at environment creation to execute shell commands when another user sources the generated script in Bash under the GB18030 locale.


12) Incorrect permission assignment for critical resource (CVE-ID: N/A)

CWE-ID: CWE-732 - Incorrect Permission Assignment for Critical Resource

CVSSv4: 5.3 [CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a local user to execute arbitrary code with another user's permissions.

The vulnerability exists due to incorrect permission assignment in virtualenv's default cache setup when a permissive umask on POSIX systems allows the cache's parent directory to be group-writable. A local user can tamper with cached seed packages to run code with the permissions of a user who creates an environment from the affected cache.


13) Untrusted search path (CVE-ID: N/A)

CWE-ID: CWE-426 - Untrusted Search Path

CVSSv4: 1.8 [CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a remote attacker to execute arbitrary code under the victim's account when the victim runs pip from an environment seeded with a modified wheel.

The vulnerability exists due to an untrusted search path in virtualenv's seed wheel acquisition when bundled pip resolves an index URL as a working-directory path on POSIX and pip index settings disable PyPI digest verification. A remote attacker can supply an untrusted project tree where the victim runs virtualenv to substitute a modified pip wheel during a seed download and introduce it into the shared wheel cache.


14) Inappropriate Encoding for Output Context (CVE-ID: N/A)

CWE-ID: CWE-838 - Inappropriate Encoding for Output Context

CVSSv4: 1 [CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a local user to execute code with another user's permissions.

The vulnerability exists due to inappropriate output encoding in virtualenv activation scripts when a non-ASCII Tcl library path is written under a legacy POSIX locale. A local user can take advantage of a misresolved path to a directory they control to run a Tcl startup script when the affected user launches a Tcl application after activation.


15) Incorrect default permissions (CVE-ID: N/A)

CWE-ID: CWE-276 - Incorrect Default Permissions

CVSSv4: 1 [CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a local user to read a copy of another user's private Python interpreter.

The vulnerability exists due to incorrect default permissions in the stdlib venv creator when it copies an interpreter on POSIX, including when it recreates an existing environment under a more restrictive umask. A local user can read the interpreter copy if the environment owner used the copy option and the destination permissions allow the local user to reach the executable.


16) Insecure DLL loading (CVE-ID: N/A)

CWE-ID: CWE-427 - Uncontrolled Search Path Element

CVSSv4: 1 [CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a local user to execute shell code with the privileges of the user activating a virtual environment.

The vulnerability exists due to an uncontrolled search path element in virtualenv activation when dash interprets percent sequences in the environment path as command lookup options. A local user can influence command lookup through a writable neighboring directory to execute shell code during activation.


17) Use of Incorrectly-Resolved Name or Reference (CVE-ID: N/A)

CWE-ID: CWE-706 - Use of Incorrectly-Resolved Name or Reference

CVSSv4: 1 [CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a local user to execute Python code with the environment user's permissions.

The vulnerability exists due to incorrect resolution of the interpreter home directory in virtualenv on POSIX when the selected CPython installation path cannot be represented faithfully in pyvenv.cfg. A local user can use control of the resulting standard library location to run Python code when another user starts the environment.


18) Incorrect Execution-Assigned Permissions (CVE-ID: N/A)

CWE-ID: CWE-279 - Incorrect Execution-Assigned Permissions

CVSSv4: 1 [CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a local user to execute a private interpreter and potentially recover its contents.

The vulnerability exists due to incorrect assignment of execute permissions in virtualenv’s built-in POSIX environment creator when it copies an interpreter and grants group or other execute access withheld by the destination directory’s default ACL or, in its absence, the process umask. A local user can run the copied interpreter if they can traverse the destination path, potentially recovering its contents.


19) Insecure DLL loading (CVE-ID: N/A)

CWE-ID: CWE-427 - Uncontrolled Search Path Element

CVSSv4: 1.8 [CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a remote attacker to execute code with the privileges of the user running virtualenv.

The vulnerability exists due to an uncontrolled search path element in virtualenv's pip wheel selection when a blank extra search directory causes it to search the working directory. A remote attacker can supply an untrusted pip wheel that virtualenv may select and execute when a user creates an environment in an untrusted checkout.


20) OS Command Injection (CVE-ID: N/A)

CWE-ID: CWE-78 - Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

CVSSv4: 5.4 [CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]


The vulnerability allows a local user to execute arbitrary shell commands with the permissions of the user activating the environment.

The vulnerability exists due to improper neutralization of shell history substitution characters in the generated activate.csh script when csh or tcsh processes the environment prompt with a nondefault history character. A local user can control the environment prompt to execute commands when the victim sources the script.


21) Insecure DLL loading (CVE-ID: N/A)

CWE-ID: CWE-427 - Uncontrolled Search Path Element

CVSSv4: 7.1 [CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]


The vulnerability allows a remote attacker to execute arbitrary code with the privileges of the user creating the virtual environment.

The vulnerability exists due to an uncontrolled module search path element in virtualenv's Python helper startup when the interpreter can import code from an untrusted working directory before the helper removes that directory from the search path. A remote attacker can supply an untrusted checkout and induce a user to create a virtual environment from that directory to execute code as that user.


22) Insecure DLL loading (CVE-ID: N/A)

CWE-ID: CWE-427 - Uncontrolled Search Path Element

CVSSv4: 1 [CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N]


The vulnerability allows a local user to execute arbitrary code with the permissions of the account running the pip helper.

The vulnerability exists due to an uncontrolled search path element in the virtualenv pip helper when a selected wheel path containing the platform's path-list separator is interpreted as multiple Python module search paths. A local user can supply modules in an unintended search directory they control to execute code when another account runs a seed install, wheel download, or periodic update that uses the helper.


23) Time-of-check Time-of-use (TOCTOU) Race Condition (CVE-ID: N/A)

CWE-ID: CWE-367 - Time-of-check Time-of-use (TOCTOU) Race Condition

CVSSv4: 1 [CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N]


The vulnerability allows a local user to cause deletion of files outside the destination environment with the invoking user's permissions.

The vulnerability exists due to a time-of-check time-of-use race condition in the app-data seeder's cleanup routine when it reuses a prepared environment. A local user can interfere with cleanup path resolution during another user's environment creation to cause deletion outside the destination.


24) Code Injection (CVE-ID: N/A)

CWE-ID: CWE-94 - Improper Control of Generation of Code ('Code Injection')

CVSSv4: 1.8 [CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:A/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N]


The vulnerability allows a remote attacker to execute arbitrary Python code with the privileges of the user who invokes an affected pip launcher.

The vulnerability exists due to improper control of code generation in the pip seeder when it rewrites launchers for environments created with the builtin creator on POSIX, allowing part of the destination path to be interpreted as Python code. A remote attacker can influence the environment's destination path and rely on a user to invoke the generated launcher to execute Python code.


Remediation

Install update from vendor's website.

References