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

Published Jun 4, 2026
·
Updated

tarfile.datafilter 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 Software

1 affected component
Python Software Foundation Python tarfile module

Event History

Jun 4, 2026
CVE Published
via OSV·02:21 PM
Data Sourced
via OSV·02:21 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is exposed to this issue?

Applications that call tarfile.extractall() on attacker-controlled or untrusted tar archives are exposed. The impact is limited by the permissions of the process performing extraction.

2

What does an attacker need to exploit it?

An attacker needs to persuade the application or user to extract a crafted tar archive. No authentication or prior privileges are required, but user interaction is required according to the supplied vector.

3

How can the issue be exploited despite use of data_filter?

A crafted archive can use link entries, including symlinks with empty or directory-like names, to redirect later archive members outside the selected extraction directory. As a result, data_filter does not reliably prevent writes outside that directory in the affected condition.

4

How can I determine whether an extraction workflow is affected?

Review whether the workflow uses tarfile.extractall() and accepts archives from untrusted sources while relying on data_filter for path containment. Test only in a controlled environment with archives containing crafted link entries and later file members, and verify whether files are written outside the extraction destination.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203