CVE-2020–24609 Savsoft Quiz 5 — Stored Cross-Site Scripting
The user registration form stored the First Name and Last Name fields without sanitisation, so a script entered there ran whenever an administrator opened the manage users page. An attacker could use this to steal the administrator's session cookie and take over the admin account.
Published on systemweakness.com
any attacker can inject malicious Javascript code and take over the admin account.
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
Impact
An attacker could inject JavaScript that runs in an administrator's browser and could steal the administrator's cookie, leading to admin account takeover.
What the attacker needed
Ability to register a user account; admin visits the manage user page
The fix
Input should be filtered on arrival and output encoded on output, with appropriate response headers and a Content Security Policy as defence in depth.
How it was found
- Go to the registration page.
- Fill in the registration details and put a script payload in the First Name and Last Name fields.
- Open the admin panel and view the manage user section, where the payload executes.
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.
When you type something into a website form, the site usually saves it and shows it again later. Here the site saved whatever was typed without cleaning it, including code that browsers run. So when an administrator later viewed the list of users, that code ran in the administrator's browser and could send the administrator's login cookie to the attacker.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.