Skip to content
RCE Write-up Intermediate

Exploiting a Single Request for Multiple Vulnerabilities

The image cropping feature accepted a user-supplied URL in the http_path parameter, which led to external SSRF, stored XSS via quote breakout, and OS command injection through ImageMagick. A reflected XSS was also found in the same functionality's GET parameters.

Osama Ansari Follow

Published on ansariosama.com

The original lives on ansariosama.com

We do not hold its text, 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 crop feature passed user-controlled input directly into server-side image processing and shell commands without validation or sanitisation.

What the attacker needed

A logged-in account; access to the image crop feature

How it was found

  1. Log in and find the image upload and crop feature.
  2. Send a crop request with the http_path parameter pointing to a listener on the tester's server.
  3. Observe the incoming connection to confirm SSRF.
  4. Insert a quote-breaking payload into http_path and view the Images page to trigger stored XSS.
  5. Fuzz other parameters and pass a double quote to see ImageMagick details reflected.
  6. Use pipe characters with a marker command to confirm command injection, then read a system file.

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.

The website let users crop images by giving it a web address to fetch. The site trusted that address too much, so the tester could make the server connect to their own machine, inject script into the page, and even run system commands. This shows how one feature can have several separate security mistakes.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by Osama Ansari

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.