Skip to content
XSS Write-up Intermediate

My first 0day exploit CSP Bypass Reflected XSS

A reflected XSS vulnerability existed in an AMP iframe redirect endpoint because user input was inserted into a JavaScript context without proper escaping. An attacker could craft a URL that executes arbitrary JavaScript in the victim's browser, potentially leading to session hijacking or other client-side attacks.

Ali Tütüncü Follow

Published on medium.com

Ali TÜTÜNCÜ

Ali TÜTÜNCÜ, 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

What the attacker needed

Victim clicks a crafted link

The fix

The vulnerability was fixed according to the report.

How it was found

  1. Visit the amp-iframe-redirect endpoint with an empty scheme_redirect and redirect_strategy=0 to observe the JavaScript code block.
  2. Test which characters are allowed by injecting special characters into the redirect_strategy parameter.
  3. Craft a payload that breaks out of the JavaScript context and executes alert(document.domain).
  4. Navigate to the URL with the crafted payload and observe the XSS alert.

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.

This report describes a cross-site scripting (XSS) bug. XSS happens when a website takes input from a URL and puts it directly into the page's code without cleaning it, so an attacker can make the page run their own JavaScript. Here, the attacker could send a specially crafted link that, when clicked, would run code in the victim's browser.

What is XSS?

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

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.