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.
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
- Log in as a normal employee and intercept the payslip download request.
- Note the sequential invoice ID in the request.
- Create a second test account and note its invoice ID.
- Using the first account's token, request the second account's invoice ID and observe a successful PDF download.
- Enumerate a range of invoice IDs to confirm other users' documents are accessible.
- 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.