How I Found My First Critical Vulnerability
An undocumented API endpoint allowed access to patient records by simply changing the patient ID parameter, with no authentication required. An attacker could retrieve full medical records for any patient by iterating through IDs.
cybersecuritywriteups.com
Published on cybersecuritywriteups.com
The ER nurse glared as I rummaged through the recycling bin. “Looking for patient records?” she snapped. “No,” I mumbled, clutching a crumpled sticky note with api/v1/patient?id=7193. That scribble would uncover a flaw exposing 2.4 million health records and change my career forever.
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 API endpoint lacked any authentication or authorization check, allowing direct access to records by manipulating the object identifier.
Impact
The flaw exposed 2.4 million health records, including names, social security numbers, and diagnoses, to anyone who could access the API.
What the attacker needed
Access to internal network or API; knowledge of patient ID parameter
The fix
The API was shut down, and the report recommended adding role-based access control.
How it was found
- Find an undocumented API route from a sticky note.
- Request a patient record using the API with a specific ID.
- Change the ID parameter to another number.
- Observe that another patient's full record is returned without authentication.
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.
The hospital's internal API had a web address that returned patient data when given a patient number. Anyone who found that address could change the number and see other patients' private medical details, because the system never checked if the person was allowed to see them.
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.