What’s Vulnerable › Vulnerabilities

CVE-2026-7774: tarfile.data_filter path traversal bypass allows writing outside the extraction directory

Description

tarfile.data_filter could be bypassed using crafted link entries, including symlinks with empty or directory-like names, to redirect later archive members outside the intended extraction directory. This allowed a malicious tar archive to cause tarfile.extractall() to write files outside the destination directory, subject to the permissions of the extracting process.

Affected products

How to fix

Upgrade to a fixed version: Python 3.10.21, 3.11.16, 3.12.14, 3.13.14. Check the vendor advisory for mitigations.

References

Get alerted when CVE-2026-7774 or the next vulnerability affects your stack