Skip to content
Misconfiguration Write-up Beginner

Unrestricted File Upload in AWS S3 Bucket

An AWS S3 bucket used by a gallery page was configured to allow unauthenticated listing, upload and deletion of files. Anyone who knew the bucket URL could add or remove content, potentially hosting malicious files or causing data loss.

infosecwriteups.com

Published on infosecwriteups.com

I was recently exploring🔍 a web application for vulnerabilities and came across an issue that could seriously compromise the security of AWS S3 buckets 🪣. While I was initially searching for a SQL injection 💉 vulnerability due to the PHP extension and the presence of an id parameter in the URL, I stumbled upon…

viperx9, 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

Likely the S3 bucket's permissions were misconfigured, granting public write and delete access instead of restricting them to authorised users.

Impact

Attackers could upload malicious files for phishing or malware distribution, delete or replace important data, or host harmful content on the bucket.

What the attacker needed

Knowledge of the S3 bucket URL; AWS CLI installed; no authentication required

The fix

The S3 bucket permissions should be restricted so that only authorised users can list, upload or delete objects.

How it was found

  1. View the gallery page source and find the S3 bucket URL used for images.
  2. Set up the AWS CLI on Kali Linux.
  3. List the bucket contents without signing in.
  4. Upload a small test text file without signing in.
  5. Access the uploaded file directly through the bucket URL to confirm it exists.
  6. Delete the test file without signing in.

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.

An S3 bucket is cloud storage, like a folder on the internet. Here the folder was left open so anyone could look inside, add files, or delete them without logging in. That means a stranger could put harmful files there or remove important ones.

What is Misconfiguration?

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.

Similar reports

View all

Same bug class and techniques, clearest first.

Security misconfiguration

The lesson behind this report.

Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.