Skip to content
Info disclosure Write-up Beginner

The Leaky Bucket Bug

Appending a jsessionid parameter to a request for a file hosted on an S3 bucket caused the backend to attempt AWS Signature V4 signing, and the resulting error message leaked the bucket name, partial access key ID, signing algorithm, and region. An attacker could use this information for reconnaissance and to chain further attacks such as bucket takeover.

medium.com

Published on medium.com

Hiyya, I am Raunak Gupta, a Security Researcher and Bug Bounty Hunter for fun and profit.

Raunak Gupta Aka B1scuit, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the backend or proxy in front of S3 attempted to sign requests containing a jsessionid parameter and returned verbose AWS Signature V4 error details instead of a generic access denied message.

Impact

The verbose error message disclosed the S3 bucket name, partial AWS Access Key ID, signing algorithm, and region, which could aid reconnaissance and chaining with other bugs, though it did not directly allow full compromise.

What the attacker needed

None

The fix

The application should be configured to return generic error messages to end users and avoid exposing AWS signing details or bucket names in error responses.

How it was found

  1. Access a file hosted on an Amazon S3 bucket directly and observe an Access Denied error.
  2. Append a jsessionid parameter to the request.
  3. Observe that the response now contains a verbose AWS Signature V4 error (SignatureDoesNotMatch) with internal details.

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 write-up has not been written yet. The Original tab links to the source.

When you request a file stored on Amazon S3, the server normally just says 'access denied' if you are not allowed. Here, adding an extra parameter made the server try to sign the request with AWS keys, and when that failed it showed a detailed error message. That message included the name of the storage bucket and other internal details, which an attacker could use to plan further attacks.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.