CPython arbitrary file write via tarfile.tar_filter link handling
Python Software Foundation CPython
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Python Software Foundation CPython |
| No fix yet |
Original description
tarfile.tar_filter could be bypassed using crafted link entries, including symlinks with empty or directory-like names, to redirect later archive members outside the intended extraction directory. This allowed a malicious tar archive to cause tarfile.extractall() with filter="tar" to write files outside the destination directory, subject to the permissions of the extracting process.