Bug 2557581 (CVE-2026-113776)

Summary: CVE-2026-113776 virtualenv: virtualenv: Arbitrary command execution via sequential placeholder substitution in activation templates
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: akhatavk, anpicker, anthomas, aos-team-art-private, aprice, asdas, cmyers, dnakabaa, dpaolell, dschmidt, ehelms, gbenhaim, ggainey, hasun, jdelft, jdobes, jfula, jlanda, jmitchel, jowilson, jpasqual, jsamir, jupierce, juwatts, jwong, kaycoth, kgaikwad, kshier, lblicha, lcouzens, lgarciaa, mbiarnes, mdellweg, mhulan, niyer, nmoumoul, nyancey, oezr, ogajduse, omaciel, ometelka, orabin, osousa, pcreech, ppalepu, ppostler, prdhamdh, prwatson, ptisnovs, rbobbitt, rchan, rhel-process-autobot, sdawley, sghai, sidsharm, simaishi, smallamp, stcannon, suppawar, syedriko, tguha, tmalecek, twaugh, vlaad, watson-tool-maintainers, xdharmai, yguenane, zhunting, zzhou
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in virtualenv. An attacker who can influence an environment's path or prompt setting can achieve arbitrary command execution when a user activates the virtual environment. This issue occurs because activation templates process substitution placeholders sequentially, allowing injected placeholder tokens inside quoted paths or prompts to be re-evaluated and break out of shell quoting in generated activation scripts.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2583255, 2583256, 2583221, 2583222, 2583257, 2583258    
Bug Blocks:    

Description OSIDB Bzimport 2026-10-21 00:17:54 UTC
virtualenv is a tool for creating isolated virtual python environments. From 20.26.6 until 21.14.2, ViaTemplateActivator.instantiate_template() replaces placeholders one key at a time across the complete activation template, so trigger names such as __VIRTUAL_NAME__, __VIRTUAL_ENV__, or __VIRTUAL_PROMPT__ inside an already substituted and quoted environment path or prompt can be replaced during a later pass. The later value's quoting can close the earlier literal and execute the remaining path when a user activates the environment through bash, fish, xonsh, or activate_this.py. The distinct csh prompt-display token __VIRTUAL_PROMPT_DISPLAY_TCSH__ can instead break the generated script without establishing command execution. The attacker must influence the destination path or --prompt, and a value without a relevant placeholder name does not trigger this mechanism. This issue is fixed in version 21.14.2.

Comment 3 errata-xmlrpc 2026-11-19 19:26:52 UTC
This issue has been addressed in the following products:

  Red Hat Ansible Automation Platform 2.7 for RHEL 9
  Red Hat Ansible Automation Platform 2.7 for RHEL 10

Via RHSA-2026:100716 https://access.redhat.com/errata/RHSA-2026:100716

Comment 4 errata-xmlrpc 2026-11-19 19:29:45 UTC
This issue has been addressed in the following products:

  Red Hat Ansible Automation Platform 2.6 for RHEL 9
  Red Hat Ansible Automation Platform 2.6 for RHEL 10

Via RHSA-2026:100715 https://access.redhat.com/errata/RHSA-2026:100715