█████████ IDOR leads to disclosure of PHI/PII
An endpoint that returns PDF medical records used a numeric identifier that could be changed to access other patients' records. Although the server responded with a redirect, the PDF content was still included in the response body, allowing an authenticated user to retrieve records of people not under their care.
- Triaged in 32 hours
- Fixed in 18 days
- Disclosed after 25 days
Summary: ████ is designed in a way where there is a vulnerable endpoint that allows a non-medical user to view the ██████████ records of people who are not ████████s of the sponsor.
Description:
I am currently an Active Duty Airman and this vulnerability does require CAC authentication. When browsing the ██████ website with a proxy I noticed that there is a function that allows sponsors (in this case me) to view their █████s shot records in PDF form. After viewing my ██████████'s shot records, I noticed this functionality lives on the following endpoint https://████=[id]. If you increment or decrement the ██████ parameter by 1 the application will throw an HTTP Status Code 302 and redirect you back to the ██████████ endpoint which is a good security practice. The issue with this is, that with the 302 redirect the PDF of the incremented ID will be attached in the body of the 302 requests, you are able to extract this when using a proxy like Burp Suite. Obviously, this is concerning because this would allow a user to pull any shot record without being associated with medical.
Step-by-step Reproduction Instructions
I have redacted the screenshots as best as possible. The screenshots are of my information, the example for validation.
- Navigate to ████/█████ and login with CAC
- Once you are authenticated browse to this endpoint, https://███████=█████████ and you should be redirected to
█████but the 302 redirect will have the PDF information of my daughter (no actual ██████████ information is loaded). - On the 302 redirects, you can utilize the function
Copy to Filein burp suite to save this request as a pdf and you will have a PDF version of my ██████ shot record.
Please review the attached screenshot, I did not pull use my █████ information for this screenshot because I have authorized to view her information. This request shows me decrementing the ██████ by 1 and showing the PDF is attached to the 302 redirects.
██████
Suggested Mitigation/Remediation Actions
Enforce the same permissions that are used for the ██████████ and ████ functions of the application.
I am more than willing to speak with the developers about this if they want to e-mail my NIPR email. I took care to not go any further than just validating that the vulnerability exists and immediately stopped and started to write this report.
Impact
PHI/PII disclosure which includes, ████████
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application checked permissions and issued a redirect but failed to remove the sensitive PDF content from the response body, and it did not verify that the requested record belonged to the user.
Impact
An authenticated user could access protected health information and personally identifiable information of individuals not associated with them, limited to records whose identifiers they can guess or enumerate.
What the attacker needed
CAC authentication; valid user account
The fix
The application should enforce the same permission checks used for the other record-viewing functions before returning any PDF content.
How it was found
- Log in to the site using CAC authentication.
- Browse to the endpoint that returns a PDF record for a given numeric identifier.
- Change the identifier by one and observe a redirect response that still contains the PDF data.
- Use a proxy tool to save the response body as a PDF file.
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 report has not been written yet. The Original tab links to the source.
When you view your own medical record, the website uses a number in the address to find it. If you change that number, the site should stop you, but here it still sent back the PDF file inside a redirect response. This means someone with a normal login could see other people's private health information.
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.