Reflected Cross-site Scripting via search query on ██████
A search query parameter was reflected into an HTML page without proper sanitisation, allowing an attacker to inject a crafted payload that executes JavaScript in a victim's browser. The attacker could run arbitrary script in the context of the vulnerable site.
- Triaged in under an hour
- Fixed in 28 days
- Disclosed after 38 days
Hi team
I found a reflected xss via search query on ████████ that allows an attacker to execute Javascript code into victim's browser.
PoC
1- Doing subdomain enumeration of ██████████, i found the following one: ████████ 2- On the search query i saw that is injecting inside an h6 html tag:
██████████
3- So to html escape, i used the following payload to trigger the XSS: </h6><image/src/onerror=alert(document.cookie)>
████
Impact
An incorrect sanitization of search query parameter allows an attacker to execute JS code into victim's browser.
System Host(s)
████
Affected Product(s) and Version(s)
CVE Numbers
Steps to Reproduce
Proof-of-concept above on the description.
Suggested Mitigation/Remediation Actions
Sanitize input data from the user to avoid html/XSS injections.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the search query parameter was inserted into the page's HTML without escaping angle brackets and other special characters, so user input could break out of the surrounding tag and add new HTML elements with event handlers.
What the attacker needed
Victim clicks a crafted search link
The fix
The search input should be HTML-escaped or sanitised before being placed into the page so that user-supplied characters cannot create new tags or event handlers.
How it was found
- Enumerate subdomains of the target and find the vulnerable host.
- Observe that the search query is reflected inside an h6 HTML tag.
- Submit a payload that closes the h6 tag and adds an image element with an error handler to trigger the script.
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 report has not been written yet. The Original tab links to the source.
When you type something into a search box, the site often shows it back to you on the results page. If the site does not clean that text properly, an attacker can put special characters in the search box that make the browser run code instead of just showing text. This is called cross-site scripting, and it lets the attacker do things in your browser as if they were the website.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.