gh-155999: Fix the tarfile tar and data extraction filters creating directories outside the destination for members whose name leaves the destination and returns to it, such as ../evil/../dest/sub/file. The containment check used the resolved path, but intermediate directories were created from the name as given.
Activity
gh-155999: `tarfile`: handle a member that leaves the destination but…
[3.14] gh-155999: `tarfile`: handle a member that leaves the destinat…
[3.13] gh-155999: `tarfile`: handle a member that leaves the destinat…
[3.12] gh-155999: `tarfile`: handle a member that leaves the destinat…
[3.15] gh-155999: `tarfile`: handle a member that leaves the destinat…
[3.11] gh-155999: `tarfile`: handle a member that leaves the destinat…
[3.10] gh-155999: `tarfile`: handle a member that leaves the destinat…
mcepl commented on Oct 7, 2026
Unfortunately, changelogs for all latest releases (except for 3.13.8) miss on the fact they fix this bug.
hugovk commented on Oct 7, 2026
This is in the changelog for 3.14:
https://docs.python.org/3.14/whatsnew/changelog.html#:~:text=gh%2D155999%3A%20Fix,name%20as%20given.
And present in https://www.python.org/ftp/python/doc/3.14.8/python-3.14.8-docs-html.zip and https://www.python.org/ftp/python/3.14.8/Python-3.14.8.tar.xz.
Also similarly for 3.10-3.13.
Please can you point to exactly where it's missing?