Zip Slip path traversal in game updater via ZipFile.extractall() without entry path validation #4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The updater downloads zip archives from the game server and extracts them with
zipfile.ZipFile.extractall()without validating whether any archive entry contains path traversal sequences (e.g.,../../). A crafted zip file can write files to arbitrary locations on the filesystem.Location
4lbion.py, lines 737–749 (with zipfile.ZipFile("temp.zip", "r") as tempZip: tempZip.extractall())Risk
This is the classic "Zip Slip" attack. If a man-in-the-middle can intercept the update traffic (the app uses plain HTTP/HTTPS without pinning), or if the update server is compromised, a malicious zip with entries like
../../.bashrcor../../.ssh/authorized_keyswould silently overwrite arbitrary user files. Because the game files are large executables, this path is exercised on every fresh install or update.Suggested fix direction
Before calling
extractall(), iterate overtempZip.namelist()and reject (or skip) any entry whose resolved path escapes the target directory:Severity
critical
Found by
Automated audit by Claude Code