How Did I Become A Doctor Using Xss Vulnerability
The profile name field allowed HTML injection, which was escalated to cross-site scripting. An attacker could inject a script into an appointment name field to steal a doctor's session cookie and impersonate the doctor.
Published on infosecwriteups.com
To all who don't know me: I am Krishnadev P Melevila , a cyber security researcher and Google certified digital marketer. You can search my name on google.
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 failed to sanitise or encode user-supplied input in the profile name and appointment name fields, allowing HTML and script injection.
Impact
An attacker could steal a doctor's session cookie and log in as that doctor, viewing other patients' appointments and attending consultations impersonating the doctor.
What the attacker needed
A user account; victim (doctor) views the appointment
The fix
The vulnerability was fixed, as the report states the bug was patched.
How it was found
- Go to the profile section and enter an HTML heading tag instead of a name to test for HTML injection.
- Replace the name with an image tag containing an onerror handler to trigger XSS.
- Book an appointment and enter a script in the name field that steals the doctor's session cookie.
- Wait for the doctor to view the appointment so the cookie is sent to the attacker's server.
- Log in using the stolen cookie to impersonate the doctor.
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 website let users type HTML code into their profile name, and later into an appointment name. Because the site did not clean this input, a malicious script could run in a doctor's browser. That script could copy the doctor's login cookie, letting the attacker log in as the doctor.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.