Bug 2580350
| Summary: | CVE-2026-113718 uv: virtualenv: arbitrary code execution via improper quoting in xonsh activation scripts [epel-all] | ||
|---|---|---|---|
| Product: | [Fedora] Fedora EPEL | Reporter: | Avinash Hanwate <ahanwate> |
| Component: | uv | Assignee: | Ben Beasley <code> |
| Status: | CLOSED NOTABUG | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | epel10 | CC: | code, mhroncok, python-packagers-sig, rust-sig |
| Target Milestone: | --- | Keywords: | Security, SecurityTracking |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | {"flaws": ["5bddf138-18ae-46cf-ba8e-813470449e72"]} | ||
| Fixed In Version: | Doc Type: | --- | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2026-11-23 21:11:42 UTC | 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: | |||
| Bug Blocks: | 2556411 | ||
|
Description
Avinash Hanwate
2026-11-21 11:11:38 UTC
https://www.cve.org/CVERecord?id=CVE-2026-113718 https://github.com/pypa/virtualenv/security/advisories/GHSA-394h-qwmc-48pf I tried the reproduction steps in the GitHub advisory, replacing > subprocess.run(["virtualenv", "--quiet", "--no-periodic-update", "--prompt", hostile_prompt, env_dir], check=True) with > subprocess.run(["uv", "venv", "--quiet", "--no-periodic-update", "--prompt", hostile_prompt, env_dir], check=True) and got: > activate_this.py read as UTF-8: os.environ["VIRTUAL_ENV_PROMPT"] = "中';__import__("os").system("touch /tmp/activate-this-gbk/MARKER")#" or os.path.basename(base) # noqa: SIM222 > Traceback (most recent call last): > File "/home/user/virtualenv/./repro", line 30, in <module> > print(f"activate_this.py read as GBK: {prompt_line.decode('gbk')}") > ~~~~~~~~~~~~~~~~~~^^^^^^^ > UnicodeDecodeError: 'gbk' codec can't decode byte 0xad in position 38: illegal multibyte sequence > decoding with 'gbk' codec failed If I comment out > print(f"activate_this.py read as GBK: {prompt_line.decode('gbk')}") then I get as far as > activate_this.py read as UTF-8: os.environ["VIRTUAL_ENV_PROMPT"] = "中';__import__("os").system("touch /tmp/activate-this-gbk/MARKER")#" or os.path.basename(base) # noqa: SIM222 > Traceback (most recent call last): > File "/tmp/repro.d/activate_with_exec_open.py", line 9, in <module> > exec(open(this_file).read(), {"__file__": this_file}) > ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > File "<string>", line 49 > os.environ["VIRTUAL_ENV_PROMPT"] = "中';__import__("os").system("touch /tmp/activate-this-gbk/MARKER")#" or os.path.basename(base) # noqa: SIM222 > ^^ > SyntaxError: invalid syntax. Is this intended to be part of the string? This suggests that either uv is not affected, or perhaps I have just botched my reproduction attempt. |