Skip to content
IDOR Write-up Beginner

How a Single UUID Change Led to an IDOR Vulnerability

A file download endpoint identified files by a UUID supplied by the client and did not check whether the requesting user was allowed to access that file. A normal user could swap in the UUID of an administrator's report and download sensitive user data.

ctf.exe890 Follow

Published on medium.com

During one of my recent penetration testing engagements, I discovered an IDOR vulnerability with a surprisingly simple test — replacing a single UUID in an intercepted request.

Prachi_Tyagi, 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

The server authenticated the user but never checked authorisation on the requested file, trusting the client-supplied UUID as proof of access.

Impact

A normal user could download files meant only for administrators, exposing usernames, email addresses, mobile numbers and other account details, which could lead to data breaches and compliance problems.

What the attacker needed

A normal user account; an admin-only file UUID to target; ability to intercept requests

The fix

The server should check on every download that the logged-in user is permitted to access the requested file, for example through role-based access control, and return 403 when they are not.

How it was found

  1. Log in as a normal user and start a file download.
  2. Intercept the download request and note the UUID used to identify the file.
  3. Replace that UUID with another valid UUID and forward the request.
  4. Observe that the server returns a different file instead of rejecting the request.
  5. As an administrator, note the UUID of a report containing sensitive user data.
  6. Log back in as a normal user, swap in the admin report's UUID, and receive the administrative 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 write-up has not been written yet. The Original tab links to the source.

Many apps give each file its own identifier, here a UUID (a long random-looking string). The server should check that the person asking is allowed to see that particular file, but here it only checked that they were logged in. So a normal user could paste in the identifier of an admin-only file and receive it.

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.