-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
TarFile.extractall(..., filter='tar') arbitrary file chmod #127987
Copy link
Copy link
Open
Labels
3.10only security fixesonly security fixes3.11only security fixesonly security fixes3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.9 (EOL)end of lifeend of lifestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or errortype-securityA security issueA security issue
Metadata
Metadata
Assignees
Labels
3.10only security fixesonly security fixes3.11only security fixesonly security fixes3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.9 (EOL)end of lifeend of lifestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or errortype-securityA security issueA security issue
Projects
Status
No status
TarFile.extractall()can be tricked into chmodding arbitrary file (outside of the destination directory) to0755, despite usingfilter='tar':filter='data'is vulnerable too, although in that case the damage is limited to updating the file timestamp:Here's the source for the
defeatpep706script:Tested with Python 3.12.8.
Linked PRs
tar.TarFile.extractall()#134628