Source code disclosed via S3 Bucket
An Amazon S3 bucket used by the Ruby CI system allowed public listing and reading of its objects, including log files that contained links to the Ruby source code repository. An attacker could browse the bucket and use the disclosed information to access source code directories.
Originally disclosed on HackerOne
- Disclosed after 23 days
Summary
The Ruby having an Amazon S3 bucked named http://rubyci.s3.amazonaws.com/ which lists some of their log files. Those logs having some informations to check the source code server side directories.
Steps to Reproduce
- direct to
http://rubyci.s3.amazonaws.com/which having READ Permission to all Objects hosted in that bucket

- Can also able to access aws-cli through
aws s3 ls s3://rubyci - direct to one of the object named last.txt as
http://rubyci.s3.amazonaws.com/aix71_ppc/ruby-2.1/last.txt

- scroll down and a line shown which directs to source code directory link
http://svn.ruby-lang.org/repos/ruby/branches/that is a initial directory for all source codes - I can check and view each and every source codes of all ruby versions
POC
Video
Impact
- The attacker can able to read any aws authorized object and use those informations to do potential attacks
- The source codes having some sensitive informations so the attacker can do impact to ruby codes that may cause major attack on users.
Attachments

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
Impact
An attacker could read objects in the bucket and use the information, including source code references, for potential further attacks.
What the attacker needed
None
How it was found
- Visit the S3 bucket URL directly.
- List the bucket contents using the AWS command-line tool.
- Open a specific log file named last.txt.
- Scroll down to find a link to the source code directory.
- View source code for all Ruby versions.
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.
An S3 bucket is a cloud storage folder. Here it was left open so anyone on the internet could list its files and read them. The files included logs that pointed to where the Ruby programming language's source code is kept, so someone could find and read that code.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.