Skip to content
Account takeover Write-up Intermediate

Otp Bypass And Account Takeover At Redacted Hospital

The patient portal's password reset flow allowed an attacker to bypass OTP verification by manipulating the server response from '0' to '1', and also exposed patient mobile numbers via an unauthenticated billing endpoint. An attacker could reset any patient's password and take over their account, accessing sensitive medical data.

Krishnadev P Melevila Follow

Published on infosecwriteups.com

To know more about me, Ask google assistant “Who is Krishnadev P Melevila” Or search for my name on google.

Krishnadev P Melevila, on infosecwriteups.com

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 application relied on a client-side response value to determine OTP verification success, and an API endpoint exposed patient mobile numbers without proper access control.

Impact

An attacker could take over any patient's account and access sensitive medical records, scan reports, and test reports.

What the attacker needed

A valid UHID; Ability to intercept HTTP responses; No authentication required

The fix

The site was closed and the IT team is working on a fix, but the text does not specify the exact remediation.

How it was found

  1. Visit the patient portal and click on Forgot/New User.
  2. Enter a valid UHID.
  3. The form asks for the last 4 digits of the mobile number; alternatively, retrieve the mobile number from the consumable billing endpoint by entering the UHID and intercepting the response.
  4. Enter the last 4 digits and proceed to the OTP entry page.
  5. Enter any random OTP and intercept the response, which contains '0'.
  6. Change the response to '1' and forward it to the client to gain access to change the password.

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 reset a password, the website sends a one-time code (OTP) to your phone to prove it's you. Here, the website trusted a simple '0' or '1' message from the server to decide if the code was correct, and an attacker could change that message to '1' to skip the check. Also, another part of the site leaked patients' phone numbers, making it easier to get the code.

What is Account takeover?

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.

More by Krishnadev P Melevila

View all

18 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.