FirstBlood-#1589 — Stored xss on api/ambulances.php
This issue was discovered on FirstBlood v3
On 2022-12-11, didsec Level 5 reported:
I have discovered a stored XSS vulnerability affecting the /api/ambulances.php
endpoint via the parameters fname
and lname
when booking an appointment.
Payload
"><svg/onload=alert(document.domain)>
To reproduce:
- Visit
firstbloodhackers.com/book-appointment.php
and fill in the information required to make an appointment
- Click
Book Appointment
and intercept the request
- Replace the
fname
or the lname
with the payload and add &ambulance=1
to the data
- Take note of the created appointment ID
- Visit
firstbloodhackers.com/api/ambulances.php?select={ID}
and the xss will execute
Impact:
- The attacker could steal a user's cookies.
- The attacker can steal data from whoever views the page.
- Users can execute arbitrary JavaScript code in the context of other users.
P2 High
Endpoint: /api/ambulances.php?select={ID}
Parameter: fname and lname
Payload: "><svg/onload=alert(document.domain)>
FirstBlood ID: 53
Vulnerability Type: Stored XSS
It is possible to achieve stored XSS on /api/ambulances.php?select={id} via the users first/last name. For this to work the parameter ambulance=1 must be set