CVE-2026-82049 in CPythoninfo

Summary

by MITRE • 09/14/2026

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.

Be aware that VulDB is the high quality source for vulnerability data.

Analysis

by VulDB Data Team • 09/14/2026

The vulnerability identified in CPython versions 3.13 and earlier affects the tarfile module, specifically concerning its handling of archive extraction filters and data processing logic. This security flaw arises from an insufficient validation mechanism when encountering complex symbolic link structures within a TAR archive. Specifically, the issue is triggered by crafted archives that contain hard links pointing to symbolic links rather than regular files or directories. The Python standard library's tarfile module includes safety mechanisms designed to prevent path traversal attacks and unauthorized file modifications during extraction. However, these safeguards fail to correctly account for the interaction between hard links and symbolic links in certain edge cases, allowing an attacker to bypass intended restrictions on where files can be written or how their metadata is handled.

From a technical perspective, the core of this vulnerability lies in the order of operations performed by the tarfile module during extraction. When processing entries that involve both hard linking and symbolic link resolution, the implementation does not strictly enforce that all resolved paths must remain within the designated destination directory before applying file system operations such as setting permissions or modification times. In a typical safe scenario, the extractor resolves any symbolic links to determine their final target location and ensures this location is sandboxed within the extraction root. However, in the presence of hard links to symbolic links, the logic may resolve the path incorrectly or apply metadata changes to the underlying inode before fully validating that the resulting file system state adheres to security constraints. This allows for scenarios where a crafted archive can cause the modification time or permissions of an arbitrary file on the host system to be altered, provided the attacker has knowledge of existing files in accessible directories.

The operational impact of this vulnerability is significant because it undermines the integrity and confidentiality guarantees expected from secure archive extraction tools. An adversary who successfully exploits this flaw could modify critical configuration files by altering their modification times or permissions, potentially disrupting application behavior or facilitating further attacks that rely on file state changes. Furthermore, if the extracted content exposes sensitive data through symlink resolution chains, it constitutes a direct information disclosure risk. This is particularly dangerous in environments where automated systems process untrusted archives, such as email gateways, download managers, or continuous integration pipelines. The ability to modify files outside the extraction directory means that even with strict sandboxing configurations, an attacker can reach beyond the intended boundary, affecting system stability and security posture.

This vulnerability aligns with CWE-22, which describes Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal. The failure to properly validate resolved paths against the extraction root allows for unauthorized access to file system resources outside the allowed scope. Additionally, it relates to CWE-732, concerning Incorrect Permission Assignment for Critical Resource, as the flaw enables the modification of permissions on files that should be protected from such changes during archive processing. From a tactical perspective, this behavior mirrors techniques found in MITRE ATT&CK framework under T1564, specifically Hidden File and Directory or T1083, which involve file system discovery and manipulation to maintain persistence or evade detection. The exploitation of hard links to symbolic links represents an advanced evasion technique that bypasses basic path validation checks by leveraging the complexities of Unix-like file systems where multiple directory entries can point to the same inode.

Mitigation strategies for this vulnerability primarily involve upgrading CPython to version 3.14 or later, where these extraction filters have been hardened to correctly handle complex link structures and enforce strict boundary checks on all resolved paths. For organizations unable to immediately upgrade their Python runtime environment, it is critical to implement external validation of TAR archives before processing them with the standard library tools. This includes using dedicated security-focused archive libraries that perform deep inspection of internal file structures or employing sandboxed execution environments such as containers or virtual machines where extraction occurs in isolated contexts. Additionally, administrators should configure strict umask settings and restrict write permissions on directories containing sensitive files to minimize the impact if an exploitation attempt is successful. Regular auditing of log entries related to archive processing can also help detect anomalous file system changes that may indicate attempted exploitation of this flaw.

Responsible

PSF

Reservation

08/28/2026

Disclosure

09/14/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Interested in the pricing of exploits?

See the underground prices here!