Skip to content
XSS Write-up Beginner

$500 How I Found XSS Using ChatGPT

A reflected cross-site scripting flaw was present where the site blocked script tags and plain javascript: links but accepted an anchor whose href used HTML character entities to encode the javascript scheme. An attacker could craft a link that runs script in a victim's browser, potentially reading cookies.

kumawatabhijeet2002 Follow

Published on medium.com

🔓Free Article Link: Click Here

Abhijeet kumawat, 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 input filter blocked literal script tags and the javascript: scheme but did not decode or normalise HTML character entities before checking, so an entity-encoded scheme passed through.

Impact

The report claims the issue was triaged as high-impact, and the payload reads document.cookie, so an attacker could potentially steal a victim's session cookie, though the text does not demonstrate actual cookie theft.

What the attacker needed

Victim clicks a crafted link; input reaches the page unescaped

How it was found

  1. Try a simple script tag payload and observe it is blocked.
  2. Ask ChatGPT for payloads without script tags and test the suggested anchor link, which works.
  3. Try an anchor with a javascript: href and observe it is blocked.
  4. Test the entity-encoded javascript link suggested by ChatGPT, which triggers the XSS.

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.

Cross-site scripting (XSS) is when a website shows text or links supplied by an attacker in a way that makes the browser run it as code. Here the site tried to block dangerous input but only checked for obvious patterns, so a disguised link slipped through. The attacker sends the crafted link to a victim, and the code runs as if the site itself had written it.

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 kumawatabhijeet2002

View all

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