Skip to content
IDOR Write-up Intermediate

From JavaScript Analysis To UUID Pattern Exploration Revealed a C

A government portal used predictable UUIDs for document identifiers, with only the first segment varying while the rest stayed constant. An attacker with an account could guess the variable part and modify other users' documents via an IDOR.

Omar Alzughaibi Follow

Published on medium.com

Hey everyone! After a little break, I’m back and excited to share an amazing story about finding a serious vulnerability.

Omar Alzughaibi, 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 application used UUIDs that were not generated with sufficient randomness, making them predictable, and failed to verify that the requesting user owned the document.

Impact

An authenticated attacker could modify any user's government documents by guessing the predictable part of the UUID, and the lack of rate limiting made this straightforward.

What the attacker needed

A user account on the portal; ability to send API requests

The fix

The application should generate UUIDs with a cryptographically secure random number generator and enforce server-side authorisation checks to ensure the requesting user owns the document.

How it was found

  1. Fuzz JavaScript file names to discover a hidden file called Reports.js.
  2. Inspect the API request in Reports.js that updates documents, noting the RequestId in the path and id in the body.
  3. Create a second account and obtain its document UUID.
  4. Use the first account to send an update request with the second account's UUID, confirming the IDOR.
  5. Collect several UUIDs and observe that only the first segment varies while the rest is constant.
  6. Guess the variable first segment to update any user's document, with no rate limiting.

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.

An IDOR (Insecure Direct Object Reference) happens when a website lets you access or change something just by changing an identifier in the request, without checking that it belongs to you. Here, the identifiers were UUIDs (long random-looking strings), but they were not random enough: most of each UUID was the same for everyone, so guessing the rest was easy.

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.

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.