CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-113715

CVE-2026-113715: Configuration Key Injection via Unicode Line Boundary in virtualenv

Amit Schendel
Amit Schendel
Senior Security Researcher

Oct 24, 2026·5 min read·8 visits

Executive Summary (TL;DR)

virtualenv prior to 21.14.9 fails to sanitize Unicode line break characters in destination directory paths, allowing configuration parameter injection into pyvenv.cfg when using the stdlib venv creator.

In virtualenv versions prior to 21.14.9, creating isolated Python virtual environments using the standard library creator (`--creator venv`) allows configuration key injection into `pyvenv.cfg` if an attacker can control or influence the destination directory path containing Unicode line break characters.

Vulnerability Overview

The virtualenv package is a widely used Python ecosystem tool for creating isolated Python runtime environments. When invoking virtualenv, users can specify various virtual environment creators, including CPython's standard library venv module (--creator venv). During execution, this creator invokes standard library components to bootstrap the basic environment structure and write an initial runtime configuration file named pyvenv.cfg.

In virtualenv versions prior to 21.14.9, creating an environment using the standard library venv creator with a destination directory containing special Unicode line break characters allows arbitrary key-value injection into pyvenv.cfg. The standard library venv module writes user-supplied directory paths directly into configuration keys such as command without escaping line boundaries.

During subsequent initialization and readback operations, virtualenv parsed pyvenv.cfg using Python's native str.splitlines() method. Because str.splitlines() breaks strings on non-ASCII Unicode line separators (e.g., U+2028 Line Separator or U+2029 Paragraph Separator), embedded characters split single parameters across multiple lines. Substrings following the line boundary are interpreted as top-level configuration key-value pairs, corrupting the configuration state.

Root Cause Analysis

The vulnerability stems from two combined design behaviors: unescaped key formatting by standard library venv.EnvBuilder and broad line break recognition during parsing in virtualenv.

When virtualenv delegates environment creation to venv.EnvBuilder, CPython writes the execution command into pyvenv.cfg without escaping non-printable or Unicode line separator characters. If the target directory path contains a Unicode line break, the key value written to disk spans multiple physical lines in logical text terms.

Python's str.splitlines() implementation recognizes a wide range of code points beyond standard ASCII carriage return (\r) and line feed (\n) characters. These include Vertical Tab (\x0b), Form Feed (\x0c), File Separator (\x1c), Group Separator (\x1d), Record Separator (\x1e), Next Line (\x85), Line Separator (\u2028), and Paragraph Separator (\u2029).

Prior to version 21.14.9, virtualenv's set_pyenv_cfg() method in src/virtualenv/create/via_global_ref/venv.py read back the intermediate pyvenv.cfg file generated by standard library venv using str.splitlines() and merged all parsed pairs into virtualenv's active configuration (self.pyenv_cfg.update(venv_content)). An attacker capable of placing a line break sequence into the path string can inject keys such as home or include-system-site-packages into the returned dictionary.

Code Analysis

In affected versions, virtualenv did not validate destination paths for line break characters before invoking venv.EnvBuilder, nor did it filter parsed parameters upon reading back pyvenv.cfg.

The flaw was mitigated in commit b0008a58885ded9227faf8f910c6c402712c750a (PR #3426) by introducing path validation prior to execution and removing the intermediate configuration readback mechanism.

    @classmethod
    def validate_dest(cls, raw_value: str) -> str:
        # Validates destination path and enforces line boundary checks
        return cls._check_line_boundaries(super().validate_dest(cls._check_line_boundaries(raw_value)))
 
    @staticmethod
    def _check_line_boundaries(value: str) -> str:
        # Standard library venv writes destination into pyvenv.cfg without escaping line boundaries.
        if collapse_line_boundaries(value) != value:
            msg: Final = (
                f"destination {value!r} must not contain a line boundary as venv cannot record it in pyvenv.cfg"
            )
            raise ArgumentTypeError(msg)
        return value
 
    def set_pyenv_cfg(self) -> None:
        super().set_pyenv_cfg()
        if self.interpreter.implementation == "GraalPy":
            # Set required launcher options directly without parsing intermediate venv output
            self.pyenv_cfg["venvlauncher_command"] = self.interpreter.system_exe
            self.pyenv_cfg["base-executable"] = self.interpreter.system_exe

The fix performs explicit validation using collapse_line_boundaries(). If any Unicode line boundary characters are detected inside the user-provided destination string, virtualenv immediately raises an ArgumentTypeError before venv writes any config files to disk.

Exploitation Mechanics

To exploit this vulnerability, an attacker must influence the destination path argument passed to virtualenv when --creator venv is used. This typically occurs in automated build pipelines, web applications hosting Python environment provisioning services, or multi-tenant developer systems where users supply directory names.

An attacker constructs a directory path string containing a embedded Unicode Line Separator character (\u2028), followed by target configuration directives:

/tmp/env\u2028include-system-site-packages = true

When venv.EnvBuilder writes pyvenv.cfg, the command entry contains the unescaped path string. Upon readback via str.splitlines(), virtualenv parses include-system-site-packages = true as a distinct key-value entry rather than part of the path value.

Alternative key injections include altering the home directive (\u2028home = /attacker/path), which controls where standard library CPython binaries and modules are loaded from during environment runtime startup.

Impact Assessment

The impact of this key injection depends on the specific keys injected into pyvenv.cfg during environment creation.

Injecting include-system-site-packages = true breaks environment isolation, causing the created virtual environment to load global site packages from the base Python installation. In multi-tenant environments, this can allow unauthorized exposure to packages or data present in global directories.

Injecting home = /attacker/controlled_path alters CPython's library resolution search order during interpreter startup. If an attacker controls or can write to the specified path, CPython may load malicious modules during startup sequence execution, leading to potential arbitrary code execution within the context of the user running the environment.

Remediation & Patch Verification

The primary remediation for CVE-2026-113715 is upgrading virtualenv to version 21.14.9 or higher.

Upgrade the package using pip:

pip install --upgrade "virtualenv>=21.14.9"

Verify that the installed version meets or exceeds the patched version:

virtualenv --version

If immediate upgrading is not possible, applications calling virtualenv programmatically should sanitize input target path arguments by stripping or rejecting string values containing Unicode line boundary characters (\u2028, \u2029, \r, \n, \v, \f, \x85).

Official Patches

PyPAPull Request #3426: Fix destination path line boundary validation
PyPAGitHub Security Advisory GHSA-qmx5-4p3x-wvqf

Fix Analysis (1)

Technical Appendix

CVSS Score
2.0/ 10
CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
EPSS Probability
0.14%
Top 97% most exploited

Affected Systems

virtualenv (PyPI package prior to 21.14.9)

Affected Versions Detail

Product
Affected Versions
Fixed Version
virtualenv
PyPA
< 21.14.921.14.9
AttributeDetail
Vulnerability IDCVE-2026-113715 / GHSA-qmx5-4p3x-wvqf
CWE IDCWE-93 (Improper Neutralization of CRLF Sequences)
CVSS v4.0 Score2.0 (Low)
CVSS VectorCVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
Affected Componentvirtualenv (--creator venv)
Exploit MaturityNone (No public exploit)
Patched Version21.14.9

MITRE ATT&CK Mapping

T1059.006Command and Scripting Interpreter: Python
Execution
T1574.007Hijack Execution Flow: Path Interception by PATH Environment Variable
Persistence
CWE-93
Improper Neutralization of CRLF Sequences ('CRLF Injection')

The software receives input containing CRLF or Unicode line boundary sequences and fails to sanitize them before writing into a line-structured configuration file, enabling attribute injection.

Vulnerability Timeline

Fix commit b0008a58885ded9227faf8f910c6c402712c750a merged into virtualenv repository via PR #3426.
2026-10-17
virtualenv version 21.14.9 released on PyPI.
2026-10-20
GitHub Security Advisory GHSA-qmx5-4p3x-wvqf and CVE-2026-113715 published.
2026-10-20

References & Sources

  • [1]GitHub Security Advisory GHSA-qmx5-4p3x-wvqf
  • [2]Fix Commit b0008a58885ded9227faf8f910c6c402712c750a
  • [3]Pull Request #3426
  • [4]virtualenv Release 21.14.9
  • [5]NVD Detail CVE-2026-113715
  • [6]CVE.org CVE-2026-113715 Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•5 minutes ago•GHSA-7MR3-28H5-M5VX
7.7

GHSA-7mr3-28h5-m5vx: Authorization Bypass and Cross-Project Volume Copy in Canonical LXD

An authorization bypass vulnerability in Canonical LXD (tracked as GHSA-7mr3-28h5-m5vx and CVE-2026-55621, and as GHSA-64f3-v33m-w89f in Linux Containers Incus) allows an authenticated user with restricted project access to copy custom storage volumes and volume snapshots from unauthorized projects. The flaw resides in the storagePoolVolumesPost REST API handler, which verifies permissions on the destination project but fails to check whether the caller holds view entitlements on the source project or volume specified in the request body.

Alon Barad
Alon Barad
0 views•10 min read
•about 1 hour ago•GHSA-47W9-6R3F-938G
9.9

GHSA-47w9-6r3f-938g: Authorization Bypass and Host Root Command Execution in Canonical LXD and Incus

A missing authorization and configuration validation vulnerability in Canonical LXD and LXC Incus allows authenticated users within restricted projects to bypass project security boundaries. By smuggling prohibited low-level configuration directives (such as raw.lxc or raw.qemu) inside instance snapshots or backup archives, an attacker can restore these configurations within a restricted project and execute arbitrary commands with root privileges on the underlying host operating system.

Alon Barad
Alon Barad
3 views•11 min read
•about 2 hours ago•GHSA-JPF8-86F3-WP38
9.9

CVE-2026-48752: Arbitrary Host File Read and Write via Templates Symlink in Canonical LXD and Incus

A symbolic link traversal vulnerability (CWE-59) in Canonical LXD and Linux Containers Incus allows an authenticated user with image import permissions to read and write arbitrary files on the host filesystem. During image archive unpacking, the daemon fails to reject top-level symbolic links for the instance `templates` directory. Subsequent requests to the instance template API endpoints follow this symbolic link outside the instance storage directory with root privileges, enabling complete host compromise.

Amit Schendel
Amit Schendel
4 views•10 min read
•1 day ago•CVE-2026-12411
8.4

CVE-2026-12411: Cross-Guest Volume Hijack via DevLXD Device PATCH in Canonical LXD

CVE-2026-12411 is a broken access control vulnerability in the DevLXD interface of Canonical LXD versions 6.6 through 6.8. The flaw resides in the devLXDInstancePatchHandler component, which fails to verify storage volume ownership when an instance attaches a new disk device via the /dev/lxd guest socket. When the security.devlxd.management.volumes configuration option is enabled, an untrusted guest or DevLXD identity can issue a crafted HTTP PATCH request referencing another tenant's custom storage volume. The LXD host daemon subsequently mounts the target volume into the requesting guest, permitting unauthorized cross-tenant read and write operations.

Amit Schendel
Amit Schendel
7 views•10 min read
•1 day ago•CVE-2026-105769
9.3

CVE-2026-105769: Azure Entra ID Token Exfiltration in Kaniko via Unanchored ACR Hostname Regex

CVE-2026-105769 (GHSA-5q7h-w9jf-cx97, GO-2026-6225) is an origin validation error and credential exfiltration vulnerability affecting Kaniko prior to version 1.25.20. The flaw stems from an unanchored regular expression in the integrated Azure Container Registry (ACR) credential helper (github.com/chrismellard/docker-credential-acr-env). When Kaniko processes a Dockerfile containing an image reference hosted on a lookalike domain containing an ACR suffix as a substring (e.g., x.azurecr.io.attacker.com), the credential helper acquires a Microsoft Entra ID access token for Azure Resource Manager and transmits it via HTTP POST to the attacker-controlled host.

Amit Schendel
Amit Schendel
11 views•11 min read
•1 day ago•CVE-2026-62300
6.5

CVE-2026-62300: Uncontrolled Resource Consumption in filecoin-pin Daemon

CVE-2026-62300 is an uncontrolled resource consumption vulnerability (CWE-400) affecting the daemon mode of filecoin-pin in versions up to and including 1.1.0. The daemon implements the IPFS Pinning Service API to store content on Filecoin's Proof of Data Possession (PDP) service. Due to the absence of rate limits, concurrency caps, execution timeouts, and Directed Acyclic Graph (DAG) traversal limits, an authenticated user—or an unauthenticated user when authentication is disabled—can exhaust system resources via crafted POST /pins requests.

Amit Schendel
Amit Schendel
9 views•11 min read