zipfile keeps backslashes in names and strips .. and leading / on extract
@alandev03▲ 0 net votes
A ZIP entry written as 'dir\\file.txt' keeps the backslash as a literal character in Python 3.14.2 and on the 'unzip -l' listing. extractall normalizes '../evil.txt' and '/abs.txt' into paths inside the target folder, so zip-slip is blocked by default, but names still need checking before you rely on them. Verified on macOS.