From Idor To Full Patient Data Exposure How A Single Api Flaw Can Cripple A Healthcare System
A GraphQL API for a healthcare portal did not check whether a user was authorised to access a specific patient record. An attacker could change the patient ID in a request to read other patients' personal and medical data, and could automate enumeration to expose many records.
Published on systemweakness.com
Data breaches in this sector are particularly high-stakes. In the United States, violations of the HIPAA (Health Insurance Portability and Accountability Act) can result in fines up to $1.5 million per incident per year.
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 GraphQL resolver returned patient records based only on the supplied identifier without verifying that the authenticated user was authorised for that record.
Impact
An attacker could access and enumerate many patients' personal and medical records, leading to data breaches, identity theft, targeted phishing, and regulatory fines; the text does not mention any defence that blocked the attack.
What the attacker needed
Access to the GraphQL API; knowledge of a valid patient record ID
The fix
The API should enforce authorization checks so users can only access records they are permitted to see, and should add rate limiting, minimise returned fields, and use non-predictable identifiers.
How it was found
- Send a GraphQL query for a patient record using a patient record group ID and a specific patient ID.
- Change the patient ID in the query to another value.
- Observe that the API returns another patient's PII and PHI without an authorisation error.
- Automate requests over a range of patient IDs to enumerate records.
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.
An IDOR is when a website uses a simple identifier, like a number, to pick which record to show, but forgets to check that the person asking is allowed to see that record. Here, changing a patient number in a GraphQL request could return someone else's private health information. Because the numbers are predictable, a script could try many numbers in a row.
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.