Skip to content
XSS Write-up Beginner

Small Payload, Big Lesson — XSS Filter Evasion

The application used a blacklist filter that blocked obvious XSS strings, but an attacker could bypass it by encoding part of the JavaScript keyword so the browser decoded it at runtime. This allowed execution of arbitrary JavaScript in the victim's browser.

medium.com

Published on medium.com

While testing a private bug bounty program (within authorized scope), I came across a small XSS bypass that reinforced a familiar lesson: tiny payloads are often enough to expose weak filtering.

Haider amin, 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 application relied on blacklist filtering that checked for literal dangerous strings without accounting for encoding or browser parsing behaviour.

Impact

An attacker could execute arbitrary JavaScript in a victim's browser, potentially leading to session hijacking or other client-side attacks.

What the attacker needed

Victim visits a page with the payload

The fix

The application should use context-aware output encoding, strict input validation, and a strong Content Security Policy instead of blacklist filtering.

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 website tried to stop malicious scripts by blocking known bad words, but the attacker hid part of the word using encoding. The browser decoded it and ran the script anyway, showing that blocking specific patterns is not enough.

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.