Impact
The vulnerability occurs when tarfile.extractall() processes a crafted archive that contains a hardlink pointing to a symlink defined deeper in the archive. The extraction routine validates the symlink at its archived location but recreates it at the hardlink’s shallower path, allowing the symlink to target a path that the destination filter considers outside the extraction directory. As a result, an attacker can create or modify files beyond the intended extraction folder, potentially writing to system files or reading sensitive data. This flaw is classified as a path traversal and hard‑link escape weakness.
Affected Systems
The flaw affects CPython distributions from the Python Software Foundation. No specific version range is listed, so any CPython release that includes the vulnerable tarfile extraction logic may be impacted until the upstream fix is applied.
Risk and Exploitability
The CVSS score of 7.8 marks the issue as high severity. The EPSS score is not available, and the vulnerability is not listed in the CISA KEV catalog. Attackers need the ability to supply or influence the tar archive processed by extractall(); based on the description, it is inferred that the attack vector involves delivering a crafted tar archive to the process calling the extraction routine. Thus the threat is most acute when a process runs with elevated privileges and extracts untrusted archives, or when untrusted archives are parsed by code that runs as the current user. destination filter, affected deployments that use tarfile without additional checks could be exploited by locally compromised users or remote code that can trigger extraction.
OpenCVE Enrichment