Register for the AI for Security Summit: Join Figma, Perplexity & Wiz

CVE-2026-87910
Python Interpreter vulnerability analysis and mitigation

Overview

CVE-2026-87910 is a security feature bypass vulnerability in Python's tarfile standard library module affecting CPython versions prior to 3.15.0 (and up to 3.16.0 per ENISA data). When extracting a hardlink on a system that does not support links, tarfile falls back to extracting the linked member from the archive and invokes the user-supplied filter function twice — once for the extracted member and once with the name set to the link's location — but ignores the return value of one of those calls. This allows a crafted tar archive to bypass extraction filters that signal rejection by returning None. The vulnerability was disclosed on September 11, 2026, with a patch merged the same day. It carries a CVSS v4.0 base score of 5.7 (Medium) (Github Advisory, oss-security).

Technical details

The root cause is classified under CWE-22 (Path Traversal) and CWE-59 (Improper Link Resolution Before File Access / Link Following). When tarfile encounters a hardlink entry on a platform without native link support (e.g., Windows), it falls back to copying the linked archive member to the link's destination path. During this fallback, the extraction filter is called twice: once for the source member and once for the link target path. The bug is that the return value from one of these two filter invocations is discarded rather than checked — meaning a filter that returns None to signal "skip this member" is silently ignored for that call, allowing the file to be written to disk anyway. A crafted archive can exploit this to write files to locations that the filter was intended to block, potentially enabling path traversal to write outside the intended extraction directory (CPython Issue, CPython PR).

Impact

Successful exploitation allows an attacker with a crafted tar archive to bypass custom extraction filters, writing files to locations that should have been blocked — including paths outside the intended extraction directory via path traversal. The primary impact is on integrity (unauthorized file writes); confidentiality and availability of the vulnerable system are not directly affected. Applications that rely on tarfile extraction filters as a security boundary (e.g., to sanitize untrusted archives) are most at risk, as the bypass could enable overwriting of sensitive files or planting of malicious content (Github Advisory, oss-security).

Exploitability

There is no public proof-of-concept exploit and no evidence of in-the-wild exploitation as of the disclosure date. The EPSS score is 0.0, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. Exploitation requires an attacker to supply a specially crafted tar archive to a victim application that uses tarfile with a custom extraction filter on a system without native link support (e.g., Windows), and requires user or application interaction to trigger extraction — limiting the attack surface (Github Advisory, oss-security).

Exploitation steps

  1. Craft a malicious tar archive: Create a tar archive containing a regular file member at a path that would normally be rejected by the target application's extraction filter (e.g., a path traversal target like ../../sensitive_file), and a hardlink entry pointing to that member.
  2. Target a vulnerable system: Identify a system running CPython < 3.15.0 on a platform without native hardlink/symlink support (e.g., Windows), where the application uses tarfile.extract() or tarfile.extractall() with a custom filter function that returns None to block certain members.
  3. Deliver the archive: Supply the crafted archive to the target application through any available input channel (file upload, network transfer, etc.) that triggers tar extraction.
  4. Trigger extraction: Cause the application to extract the archive. The filter is called twice for the hardlink fallback; the ignored None return allows the blocked file to be written to the link's destination path, bypassing the filter's intended restriction.
  5. Achieve objective: The attacker's file is written to the path specified by the hardlink entry, potentially outside the intended extraction directory, enabling file planting or overwrite of existing files (CPython Issue, CPython PR).

Indicators of compromise

  • File System: Unexpected files appearing outside the intended extraction directory after a tar extraction operation; files with names or paths that should have been blocked by the application's extraction filter.
  • Logs: Application logs showing tar extraction of archives containing hardlink entries on systems without link support (e.g., Windows); extraction operations that complete without raising filter-related exceptions when they should have been blocked.
  • Process: Python processes invoking tarfile.extract() or tarfile.extractall() with a filter argument on archives received from untrusted sources.

Mitigation and workarounds

The fix was merged into CPython main on September 11, 2026 (commit fb2f0bb), and backports were initiated for branches 3.10, 3.11, 3.12, 3.13, 3.14, and 3.15. Users should upgrade to a patched CPython release once available for their branch. As a workaround, applications can add explicit validation of extracted file paths after extraction, or avoid processing untrusted tar archives on systems without native link support. Reviewing and testing custom extraction filters to ensure they properly handle the corrected double-call behavior is also recommended (CPython PR, oss-security).

Community reactions

The vulnerability was disclosed by Petr Viktorin (encukou) of the Python Security team via the official security-announce@python.org mailing list and forwarded to the oss-security list by Alan Coopersmith. The fix was reviewed and approved by Stan Ulbrych and merged promptly on the same day as the issue was filed. No significant broader media coverage or notable external researcher commentary has been identified beyond the standard vulnerability tracking community (oss-security, CPython PR).

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

python3.11

Fixed

sid

python3.15

Affected

trixie

python3.13

Affected

Ubuntu

Unknown

bionic (esm-apps)

python3.7

Unknown

bionic (esm-infra)

python2.7

Unknown

devel

pypy3

Unknown

focal (esm-apps)

pypy3

Unknown

focal (esm-infra)

python3.8

Unknown

jammy

pypy3

Unknown

jammy (esm-apps)

pypy3

Unknown

noble

pypy3

Unknown

RHEL / CentOS

Unknown

SourceThis report was generated using AI

Related Python Interpreter vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-82049HIGH8.4
  • Python Interpreter logoPython Interpreter
  • python3-debug
NoYesSep 14, 2026
CVE-2026-84366HIGH7.4
  • Python logoPython
  • python-scrapy
NoYesSep 01, 2026
CVE-2026-19672MEDIUM6.3
  • Python Interpreter logoPython Interpreter
  • seal-python3.11
NoYesAug 19, 2026
CVE-2026-87910MEDIUM5.7
  • Python Interpreter logoPython Interpreter
  • python3.6
NoYesSep 11, 2026
CVE-2026-15310LOW2.1
  • Python Interpreter logoPython Interpreter
  • seal-python3.11
NoYesAug 25, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management