Reflected XSS bypass WAF & Page notfound
A reflected XSS vulnerability existed in a URL path parameter that was reflected into a canonical link tag's href attribute. By injecting crafted attribute-like strings, an attacker could bypass the WAF and execute JavaScript in a victim's browser, potentially stealing cookies or localStorage.
It all started with a scan using nuclei that showed a reflected XSS vulnerability in the following endpoint: “https://redacted.tld/path/path/uuid%22%3E%3C667711%3E/u-u-i-d”. However, this turned out to be a false positive.
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 reflected user input into an HTML attribute without proper encoding, and the WAF's filtering was incomplete, allowing attribute injection and JavaScript execution.
Impact
An attacker could execute arbitrary JavaScript in a victim's browser, potentially stealing cookies or localStorage data, though the report notes that the initial payload was limited and further work was needed to achieve full data exfiltration.
What the attacker needed
Victim clicks a crafted link; WAF bypass required
How it was found
- Identify a reflected XSS vulnerability in a URL path parameter that is reflected into a canonical link tag.
- Craft a payload that injects a new attribute (e.g., onclick) by using spaces and special characters to bypass the WAF.
- Use a payload with '<>' to bypass WAF and make onclick a valid attribute.
- Use string reversal to bypass WAF restrictions on JavaScript functions like fetch.
- Construct a final payload that uses fetch to send cookies to an attacker-controlled domain.
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.
The website took part of the web address and put it directly into the page's HTML code without proper cleaning. An attacker could craft a special link that, when clicked, would run malicious code in the victim's browser. This could let the attacker steal sensitive information like login cookies.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.