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.
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
- Log in and find the image upload and crop feature.
- Send a crop request with the http_path parameter pointing to a listener on the tester's server.
- Observe the incoming connection to confirm SSRF.
- Insert a quote-breaking payload into http_path and view the Images page to trigger stored XSS.
- Fuzz other parameters and pass a double quote to see ImageMagick details reflected.
- 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.