Skip to content
IDOR Write-up Beginner

How I Prevented a Data Breach by Reporting an IDOR in a System Exposing over 500,000 US Passports

An API endpoint that served uploaded documents used a sequential file identifier and did not check ownership, so changing the identifier returned other people's files. The author could download hundreds of thousands of documents, including US passports, without being their owner.

offsec01 Follow

Published on offsec01.medium.com

If we haven’t connected on LinkedIn yet, go ahead and send a request!

Facundo Fernandez, on offsec01.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 attachment download endpoint looked up files by a sequential identifier without verifying that the requesting user owned the file, and uploaded files had no owner association.

Impact

An attacker could download hundreds of thousands of uploaded documents, including US passports, without being their owner; the text does not mention any defence that limited the exploit.

What the attacker needed

A user account able to upload documents; ability to intercept HTTP requests

The fix

The issue was triaged and fixed; the report recommended adding authorization checks, using indirect references, validating input and rate limiting.

How it was found

  1. Open the documents section and click download on an uploaded file.
  2. Capture the download request in a proxy and note the file identifier parameter.
  3. Change the file identifier value and resend the request.
  4. Observe that a different document is returned.
  5. Query the attachment-list endpoint with the same identifier to list files.

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 a website lets you fetch a file by putting its number in the address, it must also check that the file belongs to you. Here it did not, so anyone who changed the number could read someone else's uploaded passport or document. This kind of mistake is called an insecure direct object reference, or IDOR.

What is IDOR?

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.

More by offsec01

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.