Skip to content
Misconfiguration Write-up Beginner

S3 Me Rolling: How an Exposed Bucket Gave Me Source Code, Secrets

An S3 bucket was publicly listable and writable, exposing environment files, source code, and credentials. The attacker used a leaked API key to obtain an admin JWT and access user PII.

iski Follow

Published on medium.com

Free Link🎈

Iski, 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 S3 bucket was configured with public read and write permissions, allowing anyone to list, download, and upload files.

Impact

The attacker could read sensitive files, obtain an admin token, and access user PII including names, emails, phone numbers, and transaction history.

What the attacker needed

Publicly accessible S3 bucket; No authentication needed

The fix

The bucket should be configured to block public access and allow only necessary permissions.

How it was found

  1. Enumerate subdomains and collect URLs.
  2. Find a URL that shows an S3 bucket listing.
  3. Download the prod.env file and extract secrets.
  4. Extract frontend.zip and find an internal API endpoint.
  5. Use the leaked API key to request an admin JWT.
  6. Use the JWT to access admin routes and retrieve user data.

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. If it is left open, anyone can list and download its files. Here, the bucket contained secrets and source code, which let the attacker get admin access to the company's API.

What is Misconfiguration?

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

More by iski

View all

186 more disclosed reports, best first.

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.