Skip to content
Access control Disclosed report Intermediate

File Read Vulnerability allows Attackers to Compromise S3 buckets using Prow

Prow signs S3 URLs by appending a fixed log filename to a user-supplied bucket path, and a crafted path with an encoded question mark comments out that suffix so the base bucket path gets signed instead. An attacker could then list and read every file in the private S3 bucket, not just Prow logs.

stealthy Follow

Originally disclosed on HackerOne

Bounty$250 Medium View original
  • Triaged in 13 days
  • Fixed in 9 months
  • Paid in 9 months
  • Disclosed after 14 months

Summary:

I found a vulnerability where AWS Prow allows users to sign the base path of S3 buckets that Prow is using. When this happens an attacker views every file in the S3 bucket and then can sign that endpoint to view the file. This vulnerability type allows attackers to dump the contents of the entire S3 production bucket for each company which may have more than just Prow server logs.

Component Version:

Latest

Steps To Reproduce:

1 - I'm just going to use this public instance of Prow I found as example. I found this vulnerability while conducting a penetration test for a private program so I cannot disclose those details.

https://prow.falco.org

2 - So on this site the vulnerable endpoint is here.

https://prow.falco.org/job-history/s3/falco-prow-logs/%2e%3f
Screen_Shot_2022-02-18_at_4.14.47_PM.png
Screen_Shot_2022-02-18_at_4.14.47_PM.png From the original on HackerOne

Supporting Material/References:

3 - Prow only expects to load log text files and appends a /latest.txt to the end of S3 URLs to be signed. By specifying /. we are getting the base URL of the bucket which lists every file and by using an encoded question mark we comment out the /latest.txt section. So, the URL to sign looks like this s3://falco-prow-logs/.?/latest.txt which signs the base path and dumps the entire private bucket details. Additionally, this technique can be used to read any file in the bucket.

https://prow.falco.org/job-history/s3/falco-prow-logs/any.valid.file%3f

Impact

Dump production data in companies S3 buckets that use Prow. Additionally, find old log files that are no longer specified in the instance GUI.

The original report as published on HackerOne, by stealthy. 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 the bucket path from the request is concatenated with a fixed log filename and signed without validating or normalising the path, so an encoded question mark truncates the suffix and the base bucket path is signed.

Impact

An attacker could dump production data in a company's S3 bucket and find old log files no longer shown in the Prow interface.

What the attacker needed

Access to a Prow instance; a bucket path reachable via job-history

How it was found

  1. Open the public Prow instance and go to the job-history S3 endpoint for a bucket.
  2. Request the bucket path followed by an encoded dot and encoded question mark.
  3. Observe that the signed URL now points at the bucket base path and lists every file.
  4. Request the bucket path followed by any valid filename and an encoded question mark to read that file.

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.

Prow is a tool that shows build logs stored in Amazon S3, a cloud file store. It builds a link to a log file and signs it, meaning it adds a cryptographic permission slip so the file can be opened. The bug lets a visitor change the path so the permission slip covers the whole bucket folder instead of one file, revealing the list of everything inside.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by stealthy

View all

4 more disclosed reports, best first.

More from Kubernetes

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.