Skip to content
XSS Write-up Beginner

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.

Krishnadev P Melevila Follow

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.

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 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

  1. Go to the profile section and enter an HTML heading tag instead of a name to test for HTML injection.
  2. Replace the name with an image tag containing an onerror handler to trigger XSS.
  3. Book an appointment and enter a script in the name field that steals the doctor's session cookie.
  4. Wait for the doctor to view the appointment so the cookie is sent to the attacker's server.
  5. 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.

More by Krishnadev P Melevila

View all

18 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.