I Found a Bug in Internal Testing: Stored XSS in KYC Form Address
The address field in a KYC form accepted and stored HTML/script input without validation or output encoding. An attacker could inject a script that executes when the profile page is viewed, enabling stored XSS.
Published on infosecwriteups.com
It was just another Tuesday of internal testing on our trading platform when I stumbled on something unexpected. I was filling out the KYC form for a test user — you know, the usual Name, Address, ID number — and I thought, “What if I try putting some HTML or script into the Address field?” To my surprise, the app…
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 address field was not validated on the server and its value was inserted into HTML without output encoding.
Impact
An attacker could execute arbitrary script in the browser of anyone viewing the profile, potentially stealing session cookies and taking over accounts, though the report only demonstrated an alert.
What the attacker needed
A normal user account; ability to submit the KYC form; victim views the profile page
The fix
The input should be sanitised and encoded on output; the report says the team fixed the bug.
How it was found
- Log in as a normal test user and open the KYC form.
- Enter a script payload in the address field and submit.
- Navigate to the user's profile page.
- Observe the script executing (an alert box 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.
A web form let someone type code (like a script) into the address box, and the site saved it and showed it back without cleaning it. When anyone later opened that profile, the code ran in their browser. This is called stored cross-site scripting (XSS) and can let an attacker act as the victim.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.