Skip to content
RCE Write-up Intermediate

Finding a Remote Code Execution (RCE) Vulnerability in a Client A

A file upload feature accepted almost any file type and executed uploaded files in certain contexts, so the tester could upload a server-side script and run commands on the host. The command output showed the process ran with high privileges, confirming remote code execution.

Dhanavel Follow

Published on medium.com

In 2025, even with modern tools and best practices, critical vulnerabilities like Remote Code Execution (RCE) can still appear, often because of misconfigurations or weak validations.

Dhanavel, on medium.com

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 upload endpoint had no proper file type validation and stored files in a location the server would execute, combined with a weakly configured server.

Impact

An attacker could run arbitrary commands on the server, and in this case the commands ran with high privileges, though the text notes most users might only get lower-level access.

What the attacker needed

Access to the file upload feature; uploaded files are executed by the server

The fix

The upload feature should validate file type and content properly and must not execute uploaded files.

How it was found

  1. Upload a normal image file to the avatar endpoint and confirm it is accepted.
  2. Upload a file with a server-side script extension and script content instead of an image.
  3. Observe that the server still reports the upload as successful.
  4. Request the uploaded file with a command parameter to run a command and read the output.

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 file upload feature let people send files to the server. The server did not check what kind of file it was, and it later ran some uploaded files as programs. That meant a tester could send a small script and ask the server to run a command, which is remote code execution: running your own code on someone else's machine.

What is RCE?

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

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.