Skip to content

gh-149486: tarfile.data_filter: validate written link target#149487

Open
encukou wants to merge 3 commits intopython:mainfrom
encukou:tarfile-validate-written-link-target
Open

gh-149486: tarfile.data_filter: validate written link target#149487
encukou wants to merge 3 commits intopython:mainfrom
encukou:tarfile-validate-written-link-target

Conversation

@encukou
Copy link
Copy Markdown
Member

@encukou encukou commented May 7, 2026

gpshead and others added 3 commits May 4, 2026 19:14
The data filter rewrote linknames with normpath() but ran the
containment check against the un-normalised value, and computed a
symlink's directory before stripping trailing slashes.  Both let a
crafted archive create links pointing outside the destination.  Also
reject link members that resolve to the destination directory itself,
which could otherwise replace it with a symlink and redirect all
subsequent members.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting merge needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants