How I Found an XSS Vulnerability on a Gray-Zone Search Feed (Invect.com)
The search results page reflected the user-supplied query parameter without encoding, allowing an attacker to inject a script that executes in the victim's browser. An attacker could steal session tokens, spoof content, or redirect users to malicious sites.
Published on medium.com
Have you ever looked closely at the URLs in your browser after an unexpected redirect?
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 application failed to sanitise user input and encode output before inserting the search query into the HTML response.
Impact
An attacker could steal session tokens if cookies lack HttpOnly, spoof page content for phishing, or redirect users to malicious sites.
What the attacker needed
Victim clicks a crafted link
The fix
The application should encode user-controlled output in the correct context and deploy a strict Content Security Policy that blocks inline scripts.
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 search box, the website usually shows it back to you on the results page. If the site does not clean that text first, an attacker can put code in the search term that the browser runs as if it were part of the website. This lets the attacker do things like steal your login or show fake messages.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.