Skip to content
XSS Write-up Beginner

How to Exploit Reflected XSS and Bypass Cloudflare Using Waybacku

A reflected XSS vulnerability existed in the game_id parameter of a URL, allowing an attacker to inject a script that executes in a victim's browser. The author claims that encoding the payload bypasses Cloudflare and can lead to session cookie theft.

hackersatty Follow

Published on hackersatty.medium.com

Hi everyone! My name is Satyam Pawale, also known as @hackersatty in the bug bounty world.

hackersatty, on hackersatty.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 application reflects user input from the game_id parameter into the response without proper validation or encoding.

Impact

An attacker could steal session cookies, leading to account takeover, and could bypass Cloudflare protections, though the text does not provide a real-world demonstration.

What the attacker needed

Victim clicks a crafted link; attacker can encode payload to bypass filters

The fix

The application should validate and sanitize user inputs, use output encoding, implement a strict Content Security Policy, and enable XSS filters.

How it was found

  1. Identify a URL with a user-controlled parameter such as game_id.
  2. Use the Waybackurls tool to find older URLs containing parameters like game_id.
  3. Craft a malicious payload, for example an SVG with an onload handler.
  4. Encode the payload to bypass Cloudflare.
  5. Insert the encoded payload into the game_id parameter and visit the URL.
  6. Observe the script executing, for example a prompt showing cookies.

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.

Reflected XSS is when a website takes something you type (like a URL parameter) and puts it directly into the page without cleaning it. An attacker can put a small script in that parameter, and when a victim clicks the link, the script runs in their browser. This can let the attacker steal the victim's session cookie, which is like a temporary password that keeps them logged in.

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 hackersatty

View all

8 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.