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.
- 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

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.
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
- Open the public Prow instance and go to the job-history S3 endpoint for a bucket.
- Request the bucket path followed by an encoded dot and encoded question mark.
- Observe that the signed URL now points at the bucket base path and lists every file.
- 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.