[3.12] gh-135034: Normalize link targets in tarfile, add os.path.realpath(strict='allow_missing') (GH-135037) by Yhg1s · Pull Request #135066 · python/cpython (original) (raw)
…th.realpath(strict='allow_missing')` (pythonGH-135037)
Addresses CVEs 2024-12718, 2025-4138, 2025-4330, and 2025-4517. (cherry picked from commit 3612d8f)
Co-authored-by: Łukasz Langa lukasz@langa.pl Signed-off-by: Łukasz Langa lukasz@langa.pl Co-authored-by: Petr Viktorin encukou@gmail.com Co-authored-by: Seth Michael Larson seth@python.org Co-authored-by: Adam Turner 9087854+AA-Turner@users.noreply.github.com Co-authored-by: Serhiy Storchaka storchaka@gmail.com
This was referenced
Jun 3, 2025
handled in 3.12 like they are in 3.13.
This one passes on MacOS, and gives some test coverage for OSErrors other than missing files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})