Skip to content
IDOR Write-up Beginner

How I Downloaded Any User’s Private Invoice : Bug Hunting Story

The payroll export endpoints did not verify that the requested invoice belonged to the authenticated user, so any logged-in employee could download other employees' payslips and tax documents by changing a sequential invoice ID. An attacker could enumerate IDs to access sensitive personal and financial data of all employees.

medium.com

Published on medium.com

Today I want to walk you through another real vulnerability I found and responsibly disclosed. Same deal as always -exact methodology, actual PoC.

Md Zishan Firoz, 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 fetched the invoice by its ID without checking that the invoice's owner matched the authenticated user.

Impact

An attacker with a valid account could download payslips and tax documents of every employee, exposing personal and financial data, and enabling identity fraud.

What the attacker needed

A valid user account; knowledge of sequential invoice IDs

The fix

The organization patched all three endpoints within 72 hours of the report.

How it was found

  1. Log in as a normal employee and intercept the payslip download request.
  2. Note the sequential invoice ID in the request.
  3. Create a second test account and note its invoice ID.
  4. Using the first account's token, request the second account's invoice ID and observe a successful PDF download.
  5. Enumerate a range of invoice IDs to confirm other users' documents are accessible.
  6. Test other export endpoints (e.g., form16) and find the same issue.

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 log in to a website, the site checks your identity (authentication). But it should also check that the data you ask for actually belongs to you (authorization). Here, the site only did the first check, so by changing a number in the web address, anyone could see other people's private payslips.

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.