Skip to content
File upload Write-up Beginner

Critical Vulnerability: File Upload to RCE via PUT Method on clientapp

The web server had the HTTP PUT method enabled, allowing an attacker to upload arbitrary files to the server. This could lead to remote code execution if executable content is uploaded, giving the attacker control over the server.

Karthikeyan.V Follow

Published on infosecwriteups.com

{{media:0}}

Karthikeyan.V, on infosecwriteups.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

The server software was configured to allow the HTTP PUT method, which permits arbitrary file uploads without proper validation or restrictions.

Impact

An attacker could execute commands with the same privileges as the web server, potentially gaining complete control over the server.

What the attacker needed

PUT method enabled on server; network access to the server

The fix

The PUT method should be disabled unless absolutely necessary, and uploaded files should be validated and sanitized.

How it was found

  1. Open a terminal.
  2. Send a PUT request to the vulnerable endpoint with a test file content.
  3. Send a GET request to the same endpoint to retrieve the uploaded file.
  4. If the response contains the same data, the endpoint is confirmed vulnerable.

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 PUT method is a way for a client to send a file to a web server, like uploading a document. If the server accepts any file without checking, an attacker can upload a malicious script. If the server then runs that script, the attacker can take over the server.

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 Karthikeyan.V

View all

21 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.