CVE-2026-82049

tarfile extraction filters allow file modification and content disclosure via hard link to symlink

Published Sep 14, 2026 CVSS 4.0 · 8.4 High EPSS < 1% KEV · Not listed
Description
In CPython 3.13 and earlier, the tarfile module's data and tar extraction filters are vulnerable to crafted archives containing a hard link to a symbolic link. Such archives may cause extraction to modify the permissions or modification time of a file outside the destination directory, or expose the contents of that file within the extracted tree.

Analysis

AI-generated

Technical impact

The CPython tarfile module accepts archive entries that combine a hard link pointing to a symbolic link, allowing the extraction to modify the permissions or modification time of a file outside the intended destination directory or to expose the contents of that file within the extraction tree. This flaw is a form of improper handling of link references (CWE‑59). An attacker who can supply a crafted archive to a program that uses tarfile extraction can cause sensitive files to be altered or leak private data, potentially undermining system integrity and confidentiality without executing arbitrary code.

Affected Systems

The vulnerability affects CPython releases 3.13 and older. Python applications that employ the tarfile module to unpack archives—especially those processing untrusted inputs—are at risk. The issue is rooted in the Python Software Foundation’s CPython code base and thus applies universally to these CPython versions regardless of operating system.

Risk and Exploitability

The vulnerability has a CVSS score of 8.4, indicating a high severity. The EPSS score is less than 1%, suggesting a low exploitation probability, and the flaw is not listed in the CISA KEV catalog. The likely attack vector is the delivery of a malicious tar archive to a target system that runs Python code with tarfile extraction capabilities; the attacker need not possess elevated privileges prior to exploitation. Because the flaw can modify files outside the extraction directory, it can be used to tamper with configuration files or to leak sensitive data that otherwise would remain inaccessible. The impact is limited to the file system level and does not directly provide remote code execution, but the ability to manipulate or read arbitrary files can facilitate broader compromise if paired with other weaknesses.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to a CPython release the hard-link handling logic is corrected.
  • If an upgrade is not immediately possible, restrict the use of tarfile to trusted archives only, validate link types, and consider performing extractions in a sandboxed environment that prevents manipulation of files outside the intended directory.
  • Continuously monitor audit trails for unexpected writes or permission changes to files outside extraction directories, and review logs for anomalies.

Generated by OpenCVE AI on September 20, 2026 at 23:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N'}

threat_severity

Important

Type Values Removed Values Added
First Time appeared Python
Python cpython
Vendors & Products Python
Python cpython
Type Values Removed Values Added
Description In CPython 3.13 and earlier, the tarfile module's data and tar extraction filters are vulnerable to crafted archives containing a hard link to a symbolic link. Such archives may cause extraction to modify the permissions or modification time of a file outside the destination directory, or expose the contents of that file within the extracted tree.
Title tarfile extraction filters allow file modification and content disclosure via hard link to symlink
Weaknesses CWE-59
References
Metrics cvssV4_0

{'score': 8.4, 'vector': 'CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Weaknesses
  • CWE-59

    Improper Link Resolution Before File Access ('Link Following')

Sources

Status
PUBLISHED
Assigner
PSF
Published
Updated
Oct 11, 2026, 12:39 AM
Reserved
Aug 27, 2026, 10:23 PM
Status
Awaiting Analysis
Published
Sep 14, 2026, 7:17 PM
Modified
Oct 11, 2026, 1:16 AM
Severity
Important
Public date
Sep 14, 2026, 7:14 PM