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.
Originally disclosed on HackerOne
- 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.
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.