Slippery Upload — 247CTF

vulnerable code

Zip Slip is a form of directory traversal that can be exploited by extracting files from an archive. The premise of the directory traversal vulnerability is that an attacker can gain access to parts of the file system outside of the target folder in which they should reside. The attacker can then overwrite executable files and either invoke them remotely or wait for the system or user to call them, thus achieving remote command execution.

Normally, the uploaded zip file will be extracted to ‘UPLOAD_FOLDER’, which is “/tmp/uploads”. But what if the zip file’s name is “../../”? -> The ‘’ will be extracted to ‘/’ directory (as we move up 2 level).

create Zip script
upload the zip file
Reload the webpage
Reload the webpage
“id” executed
cat the flag




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store