s3 bucket takeover presented in https://github.com/reddit/rpan-studio/blob/e1782332c75ecb2f774343258ff509788feab7ce/CI/full-build-macos.sh
A build script in a public GitHub repository referenced an S3 bucket name that nobody had registered, so the bucket could be claimed by anyone. An attacker who claimed it could serve their own files under the expected names and have them downloaded by anyone running the build script.
Originally disclosed on HackerOne
- Fixed in 9 days
- Paid in 9 days
- Disclosed after 3 months
Hey team,
Summary:
I have found that in the code of full-build-macos.sh in rpanstudio on github(https://github.com/reddit/rpan-studio/blob/e1782332c75ecb2f774343258ff509788feab7ce/CI/install-dependencies-osx.sh) contains a s3 bucket which was unclaimed i.e (https://obs-nightly.s3-us-west-2.amazonaws.com)
Steps To Reproduce:
- Create a s3 bucket with name obs-nightly and us west 2 region
- Upload files with the name same as given in the code (e.g. cef_binary_${1}_macosx64.tar.bz2)
- Make the settings and change it as a static website
- You have successfully taken the s3 bucket and now when any user runs the code the url with s3 get executed and an attacker can spread dangerous malware.
POC:
- Link for the s3 bucket takenover :- https://obs-nightly.s3-us-west-2.amazonaws.com/index.html

- Github link that shows the s3 bucket :- https://github.com/reddit/rpan-studio/blob/e1782332c75ecb2f774343258ff509788feab7ce/CI/install-dependencies-osx.sh

- Github link that shows the s3 bucket :- https://github.com/reddit/rpan-studio/blob/e1782332c75ecb2f774343258ff509788feab7ce/CI/full-build-macos.sh

##Remediaton You should remove the unclaimed s3 bucket as soon as possible from both the codes as it possess a critical risk
Impact
An attacker can takeover the s3 bucket and can host his malicious content with the name (cef_binary_${1}_macosx64.tar.bz2) as presented in the code and can spread ransomware and many malicious files. This bug has a critical impact because the code of the tool that many people uses, contains unclaimed s3 bucket.
Regards, Gaurav Bhatia
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 the build script referenced an S3 bucket that the project never registered, leaving the name free for anyone to claim.
Impact
An attacker could host malicious files under the expected names and spread malware to anyone running the build script.
What the attacker needed
Public GitHub repository; bucket name unregistered
How it was found
- Register an S3 bucket with the same name in the same region.
- Upload files using the same filenames the script expects.
- Configure the bucket as a static website.
- Anyone running the script then downloads the attacker's files.
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.
A build script downloaded files from a cloud storage location (an S3 bucket) whose name was not registered by the project. Cloud bucket names are global, so anyone can register an unused one. The attacker then controls what the script downloads.
What is Subdomain takeover?
A company's DNS still points at a cloud service it no longer uses, so anyone can claim it and serve content on the company's domain.