Skip to content
Access control Write-up Intermediate

One Header Away from 10+ GB of Customer Documents (PII) — $6K Bounty

The bucket allowed anonymous listing of object keys and object reads were protected only by a forgeable Referer header, so anyone could spoof the header and read all customer documents. An unauthenticated signer endpoint also let anonymous attackers obtain signed upload credentials and overwrite existing objects.

infosecwriteups.com

Published on infosecwriteups.com

An anonymous attacker could fully enumerate, read, and overwrite the production customer-service attachment bucket of a major insurer’s China operation.

Alvin Ferdiansyah, on infosecwriteups.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 application used a client-controlled Referer header as its only access control for object reads and exposed an unauthenticated signing endpoint that accepted attacker-chosen bucket and key values.

Impact

An anonymous attacker could read all customer chat attachments, including identity cards and hospital certificates, and could overwrite existing objects in the bucket.

What the attacker needed

None

The fix

The issue was fixed by disabling anonymous listing, serving objects through short-lived signed URLs, authenticating the signer, deriving identity from the session, and constraining the upload policy with a session-bound key prefix, size limit, content-type restriction, and short expiry.

How it was found

  1. Find the bucket URL by reviewing JavaScript bundles from the target host.
  2. Request an object without a Referer header and observe a 403 AccessDenied response.
  3. Request the same object with a Referer header set to the allowed domain and observe a 200 response with the file content.
  4. Send a POST request to the presigned-post endpoint with a chosen bucket and key to receive a signed upload credential.
  5. Use the returned fields in a multipart POST to the bucket to upload a file and receive a 204 response.
  6. Repeat the upload with different content to the same key and observe a different ETag, proving overwrite.

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.

A storage bucket holding customer files was protected by a check that looked at the 'Referer' header, which is just a label the requester writes themselves. Anyone could write the allowed label and read every file. A second endpoint handed out signed permission to upload files without asking who was asking, so anyone could also replace existing files.

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.

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.