Skip to content
File upload Write-up Intermediate

Compressed file upload and command execution

An admin file upload feature allowed compressed archives that were automatically decompressed, but the upload directory did not permit execution of PHP files. The text does not claim that command execution was achieved.

pz Follow

Published on blog.silentsignal.eu

In this post I would like to share some experiences of a web application hacking project. After I got access to the admin section of the web application I realized that there is a file upload function available for administrators.

pz, on blog.silentsignal.eu

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the application accepted compressed archives and decompressed them server-side without ensuring the extracted files could not be executed or placed outside the intended directory.

Impact

The text does not demonstrate command execution; the upload directory's configuration prevented PHP files from running, so no impact beyond the upload itself is claimed.

What the attacker needed

Admin access to the application; file upload feature enabled

How it was found

  1. Gain access to the admin section of the web application.
  2. Find the file upload function available to administrators.
  3. Observe that dynamic scripts such as PHP are denied and the defence cannot be bypassed.
  4. Note that compressed file upload is supported and decompression is automatic.
  5. Find that the upload directory does not allow PHP files to run.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A web application let administrators upload compressed files, which it then unpacked automatically. The author hoped this would let them run their own code, but the server was configured so that uploaded files could not be executed. The post describes the attempt and the obstacle, not a successful attack.

What is File upload?

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.

More by pz

View all

12 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Unrestricted file upload

The lesson behind this report.

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.