The Breach That Never Happened Issue #008
Changing One Number Exposed Every Customer. How a single digit in a URL gave access to every account, invoice, and transaction in the system.
Severity: Critical
Time to Exploit: 5 minutes
Cost if Breached: $2 to $7 million
What Happened
During testing of a customer-facing API, we noticed that object identifiers in API requests were simple sequential integers.
We logged in as a test user. Our account had ID 10042. We changed it to 10041 in the request. The server returned that customer’s full profile without complaint.
We changed it to 10001. Same result. We iterated through hundreds of IDs in a loop. Every single one returned the complete record of a different customer, including names, addresses, transaction history, and stored payment methods.
No special privileges. No hacking tools. Just a number and a text editor.
The issue was caught right on time. No breach occurred.
T.L.D.R.
APIs pass object references, like user IDs or invoice numbers, back and forth between the browser and the server.
When a server returns data based purely on that reference without checking whether the requesting user has permission to see it, any user can access any record.
Think of it like a hotel where every room has a number on the door, and the key to your room opens all of them.
An attacker does not need to steal a master key. They just need to know that the rooms are numbered, and that all locks are identical.
Changing one digit in a URL is all it takes.
The Impact
An attacker exploiting this could:
• Access any customer’s personal data and full account details
• Read private invoices, contracts, and transaction records
• Download or modify documents belonging to other users
• Extract an entire customer database by iterating IDs automatically
• Trigger account actions on behalf of other users without their knowledge
• Violate data protection regulations affecting every exposed customer
Real-world precedent: IDOR vulnerabilities have exposed millions of customer records across healthcare, insurance, and e-commerce platforms through simple automated enumeration.
How To Fix It
• Enforce authorization checks on every object access at the server level
• Use unpredictable identifiers such as UUIDs instead of sequential integers
• Never trust client-supplied object references without validating ownership
• Implement object-level permission checks in every API handler
• Test all API endpoints for horizontal and vertical privilege escalation
Authorization is not just about whether someone is logged in. It is about whether they are allowed to access that specific resource.
Key Takeaways
If you’re a business leader:
Being logged in is not enough. Your application must also verify that every logged-in user can only access their own data, not anyone else’s.
If you’re technical:
Implement resource-level authorization checks on every API endpoint. Validate ownership server-side, never client-side.
The bottom line:
A working login protects the front door. IDOR leaves every room inside unlocked.
What You Can Do
[ ] Audit all API endpoints for missing authorization checks on object access
[ ] Replace sequential integer IDs with UUIDs in all externally accessible references
[ ] Test all object references for horizontal privilege escalation
[ ] Include automated IDOR testing in your security pipeline
This vulnerability was discovered during real penetration testing and remediated before publication.
About The Breach That Never Happened
Monthly insights from real penetration testing engagements, real vulnerabilities, real fixes, zero breaches.
Discovered by Penti’s Agent and Penetration Testing Team.
#CyberSecurity #PenetrationTesting #IDOR #APISecuirty #PreventedBreach