Skip to content
RCE Disclosed report Intermediate

Test-scripts for postgis in mason-repository using unsafe unzip of content from unclaimed bucket creates potential RCE-issues

An S3 bucket previously owned by Mapbox was reclaimed by a researcher because S3 bucket names are globally unique. The bucket was still referenced in a test script, so the takeover created a potential path to remote code execution.

Frans Rosén Follow

Originally disclosed on HackerOne

Critical 10.0 View original
  • Triaged in 2 hours
  • Fixed in 2.3 years
  • Paid in 7 hours
  • Disclosed after 2.3 years

Summary by the program

On March 25, 2018 @fransrosen reported a vulnerability to Mapbox. An AWS S3 bucket previously owned by Mapbox was reclaimed by this researcher, which is possible due to the global namespacing of S3 buckets. This bucket was still actively referenced in a test script. The bucket takeover therefore posed a possibility for remote code execution via this S3 bucket.

Mapbox responded within a day and worked with the researcher to reclaim this bucket, as well as multiple other S3 buckets that had been claimed by the researcher and were still referenced in public Github repositories.

The incident was fully resolved, including bounty payout, by April 27 2018 when all affected S3 buckets were reclaimed and code references updated.

The original report as published on HackerOne, by fransrosen. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a dangling reference to a decommissioned S3 bucket name in a test script, allowing a bucket takeover.

Impact

The bucket takeover posed a possibility for remote code execution, though the text does not confirm that exploitation actually occurred.

What the attacker needed

Attacker registers an abandoned S3 bucket name; code still references that bucket

The fix

The affected buckets were reclaimed and the code references were updated.

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 report has not been written yet. The Original tab links to the source.

S3 bucket names must be unique across all AWS customers. If a company leaves an old bucket name in its code, someone else can register that name, and the takeover could potentially lead to remote code execution.

What is RCE?

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

More by Frans Rosén

View all

26 more disclosed reports, best first.

More from Mapbox

View all

The newest disclosed reports for this program.

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.