How I Found Cve 2022 40088
The 'page' parameter of a college website's index.php was reflected into the HTML response without encoding, allowing reflected cross-site scripting. An attacker could run JavaScript in a victim's browser by sending a crafted link.
Simple College Website 1.0 allows a user to perform Reflected Cross-site scripting via /collegewebsite/index.php?page= when sending Javascript code to the “page” parameter.
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 reflected user input from the 'page' parameter into the HTML response without encoding it.
Impact
An attacker could execute arbitrary JavaScript in a victim's browser via a crafted link, though the report does not describe any specific harm beyond script execution.
What the attacker needed
Victim clicks a crafted link
The fix
The report recommends filtering input on arrival and encoding data on output; it does not state that a fix was applied.
How it was found
- Send random text to the page parameter and observe it is reflected unencoded in the HTML response.
- Notice that the reflected output is capitalised, which breaks normal JavaScript because it is case-sensitive.
- Use an obfuscated JavaScript payload that survives capitalisation to achieve script execution.
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 website took text from the address bar and put it straight into the page without cleaning it. That let the author insert a script that the browser would run. This is called reflected cross-site scripting: the malicious script is 'reflected' back from a link the victim clicks.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.