File size: 6,117 Bytes
8ed8f6d 378a6d3 8ed8f6d d8c53ab 8ed8f6d 9f5a9eb 8ed8f6d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | ---
language:
- en
- zh
- ja
- ko
- id
- es
- ar
- ru
- de
- fr
- pt
- hi
license: mit
task_categories:
- text-classification
- tabular-classification
- other
tags:
- web-security
- bug-bounty
- security
- payloads
- polyglot
- multimodal
- adversarial
- prompt-injection
- cvss
- owasp
- cwe
size_categories:
- n<1K
dataset_info:
features:
- name: id
dtype: string
- name: record_type
dtype: string
- name: vuln_class
dtype: string
- name: value
dtype: string
configs:
- config_name: payloads
data_files:
- split: train
path: data/payloads.jsonl
- config_name: findings
data_files:
- split: train
path: data/findings.jsonl
- config_name: scans
data_files:
- split: train
path: data/scans.jsonl
- config_name: class_index
data_files:
- split: train
path: data/class_index.jsonl
---

# ποΈ Polyglot Bug Patterns
**[π Dataset](https://huggingface.co/datasets/Kicaulah/polyglot-bug-patterns)** Β·
**[π¨ Space](https://huggingface.co/spaces/Kicaulah/polyglot-bughunter-x-static)** Β·
**[π§ Model](https://huggingface.co/Kicaulah/polyglot-bughunter-x)** Β·
**[π» GitHub](https://github.com/skamy64-ux/polyglot-bughunter-x)**
---
Bro, imagine a dataset of **43 non-destructive attack payloads** across **8 bug
classes** β 24 of them *polyglot*, meaning a single string that's simultaneously
plausible HTML, JS, SQL **and** shell, so it escapes whatever context your app
dropped it into. Plus **real detector output** from a full multimodal scan.
Everything here is synthesised or locally generated. No real-world traffic, no
scraped data, no user data.
## π¦ What's inside
| Config | Rows | What it is |
|---|---:|---|
| `payloads` | 43 | Every detection payload: value, bug class, CWE, OWASP, CVSS v3.1 vector+score, polyglot flag, and a `destructive` safety flag. |
| `findings` | 36 | Real findings from one full scan of the bundled demo target, with proof strings, endpoints, remediation, tags. |
| `scans` | 1 | Scan-level rollup: pages scanned, risk score, counts by severity, modality breakdown. |
| `class_index` | 9 | Per-class counts plus totals. |
Each config ships **JSONL and Parquet**, so both of these work:
```python
from datasets import load_dataset
ds = load_dataset("Kicaulah/polyglot-bug-patterns", "payloads")
print(ds["train"][0]["value"])
print(ds["train"].filter(lambda r: r["polyglot"])[0]["value"])
findings = load_dataset("Kicaulah/polyglot-bug-patterns", "findings")
print(len(findings["train"]), "findings from one scan")
```
## 𧬠The payload classes
| Class | n | Examples |
|---|---:|---|
| `sqli` | 8 | `' OR 1=1 -- `, `UNION SELECT NULL`, MySQL error-based double-query, `ORDER BY 99` column-count probe |
| `xss` | 9 | `'"><svg/onload=alert(1)>` attr breakout, `</script><script>` closer, JS-string escape, `{{7*7}}` SSTI |
| `cmdi` | 6 | `;MARKER;`, `$(echo β¦)`, backticks, `%0a` CRLF, `${IFS}` |
| `traversal` | 5 | `..%2f..%2f..%2fetc%2fpasswd`, `....//....//`, double-double-encoded |
| `ssrf` | 5 | `http://MARKER.oast.invalid/`, `127.0.0.1`, `file:///`, `gopher://`, `[::1]` |
| `prompt-injection` | 4 | "Ignore all previous instructions", `</s>[INST] β¦ [/INST]` chat-template escape, markdown-fence system override |
| `nosql-ldap` | 3 | `*()`, `'; return true; //`, LDAP wildcard filter |
| `redirect` | 3 | absolute, protocol-relative, backslash open redirect |
Every payload carries a unique marker (`PBHX7`) so **reflection is unambiguous** β
that's what makes these usable as training signal for a detector or as a fixture
in your own test suite.
## β οΈ Safety properties
This is a **defensive** dataset. Concretely:
* Every payload is **non-destructive** by construction. The `destructive` column
is `false` for all 43 rows β verified by the same `safety.is_forbidden_payload()`
gate the scanner itself uses at runtime.
* **No** `DROP`/`DELETE`/`UPDATE`/`INSERT`, **no** `system()`/`exec()`/`xp_cmdshell`,
**no** `sleep()`/`benchmark()`, **no** reverse shells, **no** persistence.
* Time-based blind SQLi is deliberately **absent** β `sleep()` payloads are blocked
project-wide.
* Payloads are for systems **you own or are authorized to test**. Using them
against someone else's production box is illegal in most jurisdictions.
## π§ͺ Using it
**As a test fixture** β assert your WAF/filter catches the polyglot set:
```python
from datasets import load_dataset
ds = load_dataset("Kicaulah/polyglot-bug-patterns", "payloads")["train"]
for row in ds.filter(lambda r: r["vuln_class"] == "xss"):
print(row["value"]) # feed each through your own escaping function
```
**As detector training data** β `findings` pairs a payload with the signal that
proved it (`proof`), the CVSS vector, and the remediation. That's a supervised
signal for "was this injection real or a reflection".
**As an LLM security eval** β `prompt-injection` rows are ready-made instruction
overrides for testing whether your model or agent guardrails hold.
## π Provenance
* **payloads** β hand-authored from public documentation (OWASP WSTG, PortSwigger
cheat sheets, public CVE writeups), rewritten to be non-destructive and
marker-tagged.
* **findings / scans** β actual output of `Hunter.demo()` against
`polyglot_bug_hunter.demo_target`, an intentionally vulnerable app that runs on
localhost inside the test process. Regenerate with
`python tools/build_dataset.py`.
Nothing was scraped from production systems.
## π Changelog
* **v1.0.0** β initial release: 43 payloads / 8 classes (24 polyglot), 36 findings
from one full 4-modality demo scan, JSONL + Parquet, 12 languages declared.
## π€ Contribute a pattern
Missing a class? Open an issue or PR. The bar: it must be non-destructive
(the automated gate enforces it), documented with a CWE and an OWASP mapping, and
tagged for what detector signal it should produce.
<sub>MIT Β· π·οΈ PolyglotBugHunter-X Β· authorized security testing only</sub> |