PSF-2026-41: 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 CPython versions are affected?
CPython 3.13 and earlier are affected.
What access does an attacker need to exploit this issue?
The attack vector is local, requires low attack complexity, and does not require privileges. A user must participate in the extraction process by handling a crafted archive.
What security impact can result from successful exploitation?
A crafted archive can modify the permissions or modification time of a file outside the intended extraction directory. It can also expose the contents of such a file within the extracted tree.