XSS Training Lab

Progressive challenges — exploit each level to unlock harder defenses

View Cheat Sheet & Writeups Switch to SQLi Lab
0 / 30 Completed
How This Lab Works
Filter Labs:
Level 1 — Low

Hello, Reflected XSS

No filters, no encoding. Your input is reflected directly into the page. The classic starting point.

ReflectedNo Filter
Start Challenge
Level 2 — Low

Stored XSS Guestbook

Your input is stored and rendered for all visitors. Classic persistent XSS.

StoredNo Filter
Start Challenge
Level 3 — Medium

Script Tag Blocked

The server strips <script> tags. Find another way to execute JavaScript.

ReflectedTag Filter
Start Challenge
Level 4 — Medium

Attribute Injection

Your input lands inside an HTML attribute. Break out and execute code.

Attribute ContextQuote Escape
Start Challenge
Level 5 — Medium

JavaScript Context

Your input is placed inside a JavaScript string variable. Escape and inject.

JS ContextString Escape
Start Challenge
Level 6 — Hard

Event Handler Blocklist

Common event handlers (onerror, onload, onclick, etc.) are blocked. Find an obscure one.

ReflectedEvent Blocklist
Start Challenge
Level 7 — Hard

Case & Keyword Filter

Aggressive filter blocks script, alert, onerror (case-insensitive) and strips them. Use encoding or alternative functions.

ReflectedKeyword StripEncoding
Start Challenge
Level 8 — Hard

DOM-Based XSS

No server reflection. The vulnerability is entirely in client-side JavaScript reading from the URL.

DOM-basedClient-Side
Start Challenge
Level 9 — Expert

href Injection with Filters

Your input goes into an anchor href. The filter blocks <script>, event handlers, and the word "javascript". Find a way.

href ContextProtocol Filter
Start Challenge
Level 10 — Expert

CSP Bypass

A Content-Security-Policy is in place. Find a way to execute JavaScript despite the policy.

CSPNonceAdvanced
Start Challenge
Level 11 — Expert

Double Encoding Bypass

The server URL-decodes then filters. But decoding happens more than once in the pipeline...

ReflectedDouble EncodingMulti-Decode
Start Challenge
Level 12 — Expert

Client-Side Template Injection

All HTML tags are stripped. But a client-side template engine evaluates {{expressions}}.

Template InjectionNo HTMLeval
Start Challenge
Level 13 — Expert

postMessage XSS

No forms, no reflection. The page listens for cross-window messages with no origin check.

DOM-basedpostMessageConsole
Start Challenge
Level 14 — Expert

SVG Upload XSS

Upload SVG images that are rendered inline. Script tags are stripped, but SVGs have their own tricks.

StoredSVGFile Upload
Start Challenge
Level 15 — Expert

Mutation XSS

A client-side sanitizer strips scripts and event handlers. But the browser's parser may mutate HTML after sanitization.

mXSSDOMParserSanitizer Bypass
Start Challenge
Level 16 — Expert

Recursive Keyword Filter

The filter loops until nothing changes. Nesting tricks are dead. Think about alternative execution contexts.

Recursive FiltersrcdocContext Escape
Start Challenge
Level 17 — Expert

The Polyglot

Your input appears in three contexts at once: HTML body, attribute, and JavaScript string. Find the weakest link.

Multi-ContextPolyglotSource Analysis
Start Challenge
Level 18 — Expert

DOM Clobbering

Scripts and event handlers are blocked. But the page reads global variables that HTML elements can overwrite.

DOM ClobberingNamed AccessNo JS Needed
Start Challenge
Level 19 — Expert

Prototype Pollution → XSS

No HTML injection. Your JSON input is merged into a config object. Pollute the prototype chain to achieve XSS.

Prototype PollutionJSONDeep Merge
Start Challenge
Level 20 — Expert

Base Tag Injection

CSP is in place. Scripts and handlers are blocked. But the page loads scripts via relative URLs and you inject before them.

Base TagCSP BypassRelative URLs
Start Challenge
Level 21 — Expert

Dangling Markup Injection

All execution vectors are blocked. But a CSRF token is nearby. Exfiltrate it without executing any JavaScript.

Dangling MarkupData ExfiltrationNo JS
Start Challenge
Level 22 — Expert

JSON Injection in Script Block

Your input lands inside a JSON object within a nonced script tag. Angle brackets are escaped. But are quotes?

JSON InjectionScript ContextCSP Bypass
Start Challenge
Level 23 — Expert

URL Scheme Bypass

Your URL goes into an anchor href. Scripts, handlers, and javascript: are blocked. But the browser decodes HTML entities...

Entity Encodinghref ContextProtocol Bypass
Start Challenge
Level 24 — Hard

Blind XSS

Submit feedback to the admin. You won't see your payload execute, but the admin might.

Blind XSSStoredAdmin Panel
Start Challenge
Level 25 — Expert

Unicode Normalization

The server filters dangerous characters, then normalizes the text using NFKC. Can you bypass the filter?

UnicodeNFKCFilter Bypass
Start Challenge
Level 26 — Expert

CSS Injection

Standard scripts are blocked, but you control a style block. Can you exfiltrate a secret token using only CSS?

CSSXSSData Exfiltration<style>
Start Challenge
Level 27 — Expert

window.name XSS

The page doesn't reflect the URL. But the client-side script reads window.name. Can you smuggle a payload across origins?

DOM-Basedwindow.nameCross-Origin
Start Challenge
Level 28 — Expert

Header Injection

The server tracks where you came from. Can you inject a payload via an HTTP header instead of the URL?

HTTP HeadersRefererProxy Tools
Start Challenge
Level 29 — Expert

WebSocket XSS

This chat app receives messages via WebSockets. Can you exploit the real-time message rendering?

WebSocketsReal-timeDOM-Based
Start Challenge
Level 30 — Expert

Service Worker Hijack

Register a Service Worker to intercept all requests. Requires chaining with a JSONP endpoint.

Service WorkerJSONPPersistent DOM XSS
Start Challenge