Skip to content
Misconfiguration Disclosed report Beginner

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.

thevillagehack3r Follow

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

  1. direct to http://rubyci.s3.amazonaws.com/ which having READ Permission to all Objects hosted in that bucket
1.png
1.png From the original on HackerOne
  1. Can also able to access aws-cli through aws s3 ls s3://rubyci
  2. direct to one of the object named last.txt as http://rubyci.s3.amazonaws.com/aix71_ppc/ruby-2.1/last.txt
Screenshot_from_2020-01-21_15-02-42.png
Screenshot_from_2020-01-21_15-02-42.png From the original on HackerOne
  1. 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
  2. I can check and view each and every source codes of all ruby versions

POC

Video

video.webm From the original on HackerOne

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

2.png
2.png From the original on HackerOne

The original report as published on HackerOne, by thevillagehack3r. 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

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

  1. Visit the S3 bucket URL directly.
  2. List the bucket contents using the AWS command-line tool.
  3. Open a specific log file named last.txt.
  4. Scroll down to find a link to the source code directory.
  5. 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.

More from Ruby

View all

The newest disclosed reports for this program.

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.