-
-
Notifications
You must be signed in to change notification settings - Fork 35.7k
tarfile data/tar filter bypass via hard link to a symlink #157190
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 fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-securityA security issueA security issue
Description
Activity
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 fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-securityA security issueA security issue
Projects
- StatusShow more project fieldsNo status
On CPython 3.13.15 for Linux, an attacker-controlled tar archive extracted with the
tarordatafilter can maketarfilechange the permissions and modification time of an existing file outside the extraction directory. The archive also leaves a path inside the extracted tree that resolves to the outside file. Opening that path returns the outside file's content.This was incidentally fixed by 5a57248 for 3.14+ which changed
os.linkto useAT_SYMLINK_FOLLOW.Linked PRs
tarfilehard links #157191data/tarfilter bypass via hard link to a symlink #157192tarfilehard links (GH-157191) #157261tarfilehard links (GH-157191) #157262data/tarfilter bypass via hard link to a symlink (GH-157191) (GH-157192) #157454