Skip to content

CVE-2026-11940: CPython tarfile Extraction Filter Directory Traversal Bypass

HERMES

HERMES THREAT SCORE & APPLICATION RUNTIME ATTACK SURFACE

Target: CPython (Lib/tarfile.py - filter='data')
Confidence: 94%
86 / 100
HIGH

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Exploitability 18 / 20
Threat Activity 16 / 20
Weaponization 17 / 20
Exposure 18 / 20
Prevalence 19 / 20
Impact 18 / 20
Exploit Maturity 17 / 20
Attack Chain Potential 19 / 20
โš–๏ธ Divergence & Operational Rationale

CVSS v3.1 rates CVE-2026-11940 at 7.5 (HIGH, CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N). The Hermes Threat Score evaluates operational impact at 86 (HIGH) reflecting broad ecosystem exposure across data pipelines, MLOps, and developer environments.

๐Ÿ•ธ๏ธ Connected Knowledge Graph & Provenance

CVE-2026-11940: CPython tarfile Extraction Filter Directory Traversal BypassVULNERABILITY

Connected Nodes: 1
Active Relationships (Outgoing)
→ affectsPRODUCTCPython Interpreter & Standard Library
98% VERY_HIGH

Software platform affected by security vulnerabilities and agentic attack patterns.

๐Ÿ” Why is this related? (Evidence & Provenance)

“Confirmed security vulnerability in CPython Interpreter & Standard Library documented in Hermes dossier.”

Supporting Verified Evidence:

The component CPython (Lib/tarfile.py - filter='data') provides fundamental runtime services and data parsing across Python microservices, analytics pipelines, and AI platforms.

ParameterTechnical SpecificationThreat Intelligence Context
CVE IdentifierCVE-2026-11940Official Upstream Security Release
Affected Productpython:cpythonPython Ecosystem Component
Vulnerable ComponentCPython (Lib/tarfile.py - filter='data')Standard Library / Package Utility
Weakness ClassCWE-22: Improper Limitation of a Pathname to a Restricted DirectoryExecution / Resource Safety Flaw
CVSS v3.1 Score7.5 (HIGH / Hermes Score 86)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Fixed Version3.13.15Official upstream patch release
MITRE ATT&CKT1036.005 - Masquerading: Match Legitimate Name or Location, T1203 - Exploitation for Client ExecutionExecution / Denial of Service
Forensic Cross-ReferenceLinux File System Integrity and Tree Traversal ForensicsMemory analysis and process diagnostics

Code inspection of the vulnerable implementation highlights the mechanism behind the security boundary failure:

# Flaw in Lib/tarfile.py (data_filter)
def data_filter(member, dest_path):
if member.islnk():
# VULNERABILITY: Resolves link target relative to member.linkname
# without verifying if link target is shallower than the original symlink
target_path = os.path.join(dest_path, member.linkname)
if not _is_subpath(target_path, dest_path):
raise FilterError("Hardlink escapes destination")
# Hardlink referencing a symlink '../' bypasses destination confinement!
return member

When unvetted user input reaches this routine, the application encounters an unhandled edge case or unbounded processing loop, destabilizing the execution environment or enabling control-flow manipulation.


  1. Initial Vector & Preconditions: A user or CI/CD build runner unpacks a third-party tarball using tarfile.extractall(path='/tmp/build', filter='data').
  2. Triggering Primitive: The attacker injects crafted payload data targeting CPython (Lib/tarfile.py - filter='data').
  3. Control Bypass / Resource Saturation: Flaw in Lib/tarfile.py (data_filter).
  4. Impact Realization: The malicious tarball includes a hardlink to a relative symlink that resolves to ../../root/.ssh/authorized_keys, overwriting SSH keys and granting the attacker remote root shell access..

Security operations centers and incident response teams can identify exploitation activity through process telemetry, memory dumps, and operating system audit trails.

Process Telemetry & Logs

Inspect application logs and process crash diagnostics matching: audit: type=1300 ... path="/etc/cron.d/" syscall=symlinkat success=yes comm="python3". Monitor for abnormal CPU spikes or unexpected out-of-memory terminations.

sigma_cve_2026_11940.yaml
title: Suspicious Symlink Creation Outside Tarfile Extraction Root
id: cve-2026-11940
status: experimental
description: Detects anomalies and resource abuse associated with CVE-2026-11940.
logsource:
category: process_creation
product: linux
detection:
selection:
- 'audit:'
- 'cpython'
condition: selection
fields:
- CommandLine
- User
level: high

Immediate remediation involves upgrading to patched library versions and enforcing input sanitization best practices:

  1. Package Upgrade: Update python:cpython to version 3.13.15 or higher using pip install --upgrade or distribution security repositories.
  2. Defensive Programming: Enforce strict size quotas, input schema validation, and disable unsafe deserialization primitives (replace pickle with safetensors or JSON).
  3. Forensic Guidance: For complete forensic telemetry workflows, consult our guide on Linux File System Integrity and Tree Traversal Forensics.