Skip to content
XSS Write-up Intermediate

Bypassing Razer’s WAF for XSS

The URL parameter on the /ajax endpoint was reflected into a link without proper validation, allowing a javascript: protocol payload. An attacker could craft a link that executes JavaScript when clicked, despite a web application firewall that blocked certain words and characters.

N45HT Follow

Published on medium.com

While testing Razer’s web application, I identified an XSS vulnerability in their /ajax endpoint. The issue arises due to insufficient validation of the URL parameter, allowing JavaScript execution despite filtering attempts.

N45HT, on medium.com

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 server failed to validate the URL scheme and sanitise the parameter before reflecting it into an anchor tag, and the WAF's blacklist could be bypassed by inserting braces inside blocked words.

Impact

An attacker could execute arbitrary JavaScript in a victim's browser if the victim clicks a crafted link, potentially leading to session theft or other client-side attacks, though the report only demonstrates an alert.

What the attacker needed

Victim clicks a crafted link

How it was found

  1. Discover the URL parameter using Arjun.
  2. Confirm the parameter value is reflected in the response.
  3. Test the javascript:// protocol to see if JavaScript can be injected.
  4. Observe that certain words and characters are blocked by the backend.
  5. Bypass the filter by embedding braces inside blocked words.
  6. Craft a final payload and open the vulnerable URL.

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 web page took a value from the address bar and put it directly into a link without checking it. Because the link could start with 'javascript:', clicking it would run code in the visitor's browser. The site had a filter, but the tester found a way around it by hiding blocked words inside curly brackets.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by N45HT

View all

5 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.