Oct 24, 2026·4 min read·8 visits
virtualenv versions 21.14.8 and 21.14.9 leave dangling symlinks when transient application data directories are deleted, enabling local code execution on shared systems.
Insecure temporary file usage (CWE-377) in virtualenv app-data seeder creates dangling symlinks pointing to deleted temporary directories, allowing local attackers on shared systems to execute arbitrary code.
The Python package virtualenv is a foundational component of the Python software ecosystem used to create isolated execution environments. To populate new environments with core utility packages—including pip, setuptools, and wheel—virtualenv utilizes seeder mechanisms, primarily the app-data seeder (FromAppData).
When the default application data directory is unwritable or restricted by system permissions, virtualenv falls back to creating a transient storage directory within system temporary storage (such as /tmp). When configured to seed packages via symbolic links, virtualenv creates symlinks in the new environment's site-packages directory that point directly into this transient application data cache.
Upon completion of the virtual environment creation process, virtualenv performs cleanup operations and deletes the transient application data folder. This leaves dangling symbolic links inside the target environment's site-packages directory pointing to file paths that no longer exist.
The root cause of CVE-2026-113713 lies in incomplete validation of the application data directory's transient state during option evaluation within the FromAppData seeder class, categorized under CWE-377 (Insecure Temporary File).
While command-line option parsing included logic to explicitly disable --symlink-app-data whenever temporary application data was active, this protection was bypassed when symlink seeding was requested through environment variables (such as VIRTUALENV_SYMLINK_APP_DATA=true) or configuration file settings in virtualenv.ini.
The constructor for FromAppData assigned self.symlinks = options.symlink_app_data without verifying whether self.app_data.transient evaluated to True. Consequently, symlinks were generated pointing into transient directory structures, which were subsequently deleted from the host filesystem upon completion of environment creation.
Analyzing the implementation within src/virtualenv/seed/embed/via_app_data/via_app_data.py highlights how configuration option processing was updated in commit b81995c3feab9e1edb453c75ffc6616e1a77335e.
In vulnerable versions 21.14.8 and 21.14.9, the initialization method directly trusted options.symlink_app_data without evaluating self.app_data.transient. The patch updates the assignment to enforce an explicit conditional check that suppresses symlink creation if the application data location is transient.
class FromAppData(BaseEmbed):
def __init__(self, options: VirtualEnvOptions) -> None:
super().__init__(options)
# Vulnerable:
# self.symlinks = options.symlink_app_data
# Patched:
self.symlinks = options.symlink_app_data and not self.app_data.transient
if options.symlink_app_data and self.app_data.transient:
LOGGER.debug("copy seed packages because temporary app-data is removed after creation")By ensuring that self.symlinks resolves to False whenever self.app_data.transient is True, virtualenv safely falls back to copying seed package files instead of creating links to transient paths.
Exploitation occurs in shared multi-user operating system environments where unprivileged users share access to common temporary directories such as /tmp.
An attacker monitors system temporary directories or predicts the temporary directory path pattern created during virtualenv execution. When a victim user creates a virtual environment using transient application data while symlinking is configured via environment variables, virtualenv creates dangling links and deletes the temporary directory.
The attacker subsequently creates the expected directory structure in the shared temporary directory and inserts a malicious Python module (e.g., pip/__init__.py). When the victim invokes Python binaries or imports modules from within the affected virtual environment, the Python interpreter resolves the dangling symlink to the attacker-controlled path, executing the malicious code under the victim user context.
Successful exploitation allows an unprivileged local attacker to execute arbitrary code with the full privileges of the victim user. In shared workstation or multi-tenant CI/CD build environments, this enables local privilege escalation to match the targeted user account.
The vulnerability is assessed with a CVSS v4.0 Base Score of 4.4 (CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N). The High Integrity rating reflects the complete loss of control over code executed within the victim's Python virtual environment.
The EPSS score is 0.00107, placing it in the 1.10th percentile for predicted exploitation probability. The flaw is not listed in the CISA KEV catalog, and no public weaponized exploit code has been identified.
To remediate CVE-2026-113713, upgrade virtualenv to version 21.14.10 or later using standard Python package management tools:
pip install --upgrade virtualenv>=21.14.10If immediate upgrading is not feasible, administrators should audit multi-user build environments to ensure VIRTUALENV_SYMLINK_APP_DATA is not enabled in environment variables or system-wide virtualenv.ini configuration files.
System administrators should also enforce directory access controls on shared temporary storage, ensuring the sticky bit (chmod +t /tmp) is enabled and utilizing isolated temporary directory namespaces (PrivateTmp=true in systemd services) for automated build workflows.
CVSS:4.0/AV:L/AC:H/AT:P/PR:L/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N| Product | Affected Versions | Fixed Version |
|---|---|---|
virtualenv PyPA | >= 21.14.8, < 21.14.10 | 21.14.10 |
| Attribute | Detail |
|---|---|
| CVE ID | CVE-2026-113713 |
| Vulnerability Type | Insecure Temporary File (CWE-377) |
| CVSS v4.0 Score | 4.4 (Medium) |
| EPSS Score | 0.00107 (1.10th percentile) |
| Affected Component | virtualenv app-data seeder (FromAppData) |
| Impact | Local code execution via dangling symlink hijacking |
| CISA KEV Status | Not Listed |
| Fixed Version | 21.14.10 |
The software creates or uses a temporary file in an insecure manner, which can allow an attacker to read, modify, or replace file contents.
An algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) before version 3.10.4 allows remote unauthenticated attackers to cause a denial of service via crafted Combinatory Categorial Grammar (CCG) lexicon strings. The parser in nltk.ccg.lexicon.fromstring performs repeated immutable string slicing, concatenation, and regex tail capturing, resulting in O(n^2) CPU consumption when processing wide, flat category definitions.
CVE-2026-126295 (also tracked as GHSA-fg9w-wfp5-j933) is a path confinement bypass vulnerability in the Natural Language Toolkit (NLTK) affecting versions 3.10.0 prior to 3.10.4. The flaw resides in nltk/parse/bllip.py within the BllipParser class and its factory method BllipParser.from_unified_model_dir(). Unlike sibling tool wrappers in NLTK that enforce data-root confinement via the nltk.pathsec module, BllipParser passes caller-supplied filesystem paths directly into the third-party bllipparser native C extension without validation. When an application passes untrusted input as model paths or directories to BllipParser, an attacker can force the native extension to open arbitrary files on the local filesystem. This leads to information disclosure through parser diagnostic oracles, local model tampering via shared directories, and denial of service by hanging worker threads on blocking special files (such as FIFOs or device nodes) or exhausting memory via oversized files.
CVE-2026-126300 (GHSA-ffr9-mgrr-wcvr) is an inefficient algorithmic complexity vulnerability (CWE-407) in the Natural Language Toolkit (NLTK) Python library affecting versions 3.2.5 prior to 3.10.4. The flaw resides in the quote-restoration routine of TreebankWordTokenizer.span_tokenize and NLTKWordTokenizer.span_tokenize, where repeated calls to list.pop(0) over matched quote tokens introduce quadratic O(n^2) time complexity. An unauthenticated remote attacker who supplies input containing long sequences of double-quote characters can exhaust CPU resources and degrade service availability.
The Natural Language Toolkit (NLTK) versions 3.6 through 3.10.3 contain an algorithmic complexity vulnerability in the LegalitySyllableTokenizer.tokenize method. When processing tokens composed of continuous runs of vowels, an unguarded string reversal and set membership lookup loop executes in quadratic time relative to the input token length. Remote attackers capable of submitting arbitrary text to applications utilizing this tokenizer can trigger sustained single-core CPU exhaustion and application-level denial of service.
CVE-2026-126304 is a symlink path traversal vulnerability (CWE-59) in the Natural Language Toolkit (NLTK) versions 3.10.0 prior to 3.10.4. The YCOECorpusReader class constructs internal sub-readers for the 'psd' and 'pos' subdirectories using FileSystemPathPointer.join(), which relies exclusively on lexical string-prefix validation rather than canonical path resolution. An attacker who supplies a crafted YCOE corpus containing symbolic links in place of the 'psd' or 'pos' subdirectories can bypass directory confinement and read arbitrary files from sibling corpora or sensitive directories within the NLTK data sandbox.
CVE-2026-128077 (GHSA-r99w-jh2x-3mg9) is an authorization bypass and interpretation conflict vulnerability affecting Nuxt and its underlying @nuxt/nitro-server package in versions 4.6.0 through 4.6.3. When an incoming HTTP request path begins with a double forward slash (e.g., //x/admin), the WHATWG URL parser within the Nuxt server-side page renderer interprets the initial segment as a network host/authority and resolves the remaining path (/admin) against the application's page router. Because Nitro server middleware, route-scoped serverHandlers, and Nitro routeRules evaluate the unparsed request path (//x/admin), path-based access controls, redirects, and security header policies configured for /admin fail to match and are bypassed.