Stored Cross-Site Scripting (XSS) Vulnerability Report
The PQMS application stores user-supplied input in the database without validation and later renders it unencoded in the Patient Search results. An attacker can inject JavaScript that executes whenever the affected patient record is viewed, potentially stealing session cookies or performing actions as another user.
medium.com
Published on medium.com
Author: Ravi Pipalwa Date: January 28, 2026 System: PQMS — Patient Queue Management System Environment: Localhost (PHP-based Web Application) Affected Modules: New Patient Registration, Patient Search Severity: Critical Vulnerability Type: Stored Cross-Site Scripting (Stored XSS) Vendor Homepage…
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
The application fails to validate input on the server and does not encode output when rendering stored patient data in HTML.
Impact
If exploited in production, an attacker could steal session cookies, perform unauthorized actions, access or manipulate patient data, and conduct phishing attacks, though the report only demonstrates an alert popup in a local environment.
What the attacker needed
Access to the registration form; victim views the patient record
The fix
The application should encode all user-supplied data before display, sanitise input, and implement a Content Security Policy.
How it was found
- Open the New Patient Registration page.
- Enter a crafted HTML payload in the First Name field.
- Fill in the remaining required fields with valid data.
- Complete the registration.
- Navigate to the Patient Search page and search for the newly created patient record.
- Observe that the payload is displayed and a browser alert appears.
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.
Stored cross-site scripting (XSS) happens when a website saves something a user typed and later shows it to other people without cleaning it first. If the saved text contains code, the browser runs that code as if the website itself had written it. Here, a name field accepted a small piece of HTML that made the browser show an alert, proving an attacker could run their own code in other users' browsers.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.