BIT-python-2026-82049: tarfile extraction filters allow file modification and content disclosure via hard link to symlink
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.
Affected Software
Event History
Frequently Asked Questions
Which extraction modes are affected?
The issue affects CPython tarfile extraction when using the data or tar extraction filters. CPython 3.13 and earlier are affected.
What must an attacker provide to exploit this issue?
An attacker needs to supply a crafted tar archive containing a hard link to a symbolic link and have it extracted with an affected filter. User interaction is required according to the supplied severity vector.
What can a successful exploit do outside the extraction directory?
The crafted archive can cause permissions or modification time changes to a file outside the destination directory. It can also expose that file's contents within the extracted tree.