Agent skill · security · yaklang
xslt-injection
XSLT injection testing: processor fingerprinting, XXE and document() SSRF, EXSLT write primitives, PHP/Java/.NET extension RCE surfaces. Use when user-controlled XSLT/stylesheet input or transform endpoints are in scope.
Why this skill is useful
Adds executable XSLT payloads and testing methodologies for XXE and SSRF vulnerabilities that are not commonly known.
What it needs
About 4k tokens when loaded. Last updated 2026-06-16. 1,563 stars on the source repository.
What this skill does
SKILL: XSLT Injection — Testing Playbook AI LOAD INSTRUCTION: XSLT injection occurs when attacker-influenced XSLT is compiled/executed server-side. Map the processor family first (Java/.NET/PHP/libxslt). Then chain document(), external entities, EXSLT, or embedded script/extension functions per platform. Authorized testing only; many payloads are destructive. Routing note: if input is generic XML parsing and may not flow through XSLT, cross-load xxe-xml-external-entity; if you care about outbound document(http:...) requests, cross-load ssrf-server-side-request-forgery. --- 0. QUICK START 1. Find sinks: parameters named xslt, stylesheet, transform, template, SOAP stylesheets, report generators, XML→HTML converters. 2. Probe reflection: inject unique namespace or xsl:value-of select="'marker'" — if output changes, execution likely. 3. Fingerprint processor (§1). 4. Escalate by family: document() / XXE (§2–3), EXSLT write (§4), PHP (§5), Java (§6), .NET (§7). Quick probe (harmless marker): --- 1. VENDOR DETECTION Use standard system-property reads inside expressions: Typical fingerprints (examples, not exhaustive): Signal Possible engine -------- ------------------ Apache Software Foundation / Xalan markers Xalan (Java) Saxonica / Saxon URI hints Saxon libxslt / GNOME stack libxslt (C, often via PHP, nginx modules, etc.) Microsoft URLs / MSXML strings MSXML / .NET XSLT stack Use results to select §5–§7 paths. --- 2. EXTERNAL ENTITY (XXE VIA XSLT) XSLT 1.0 allows DTD-based entities in the stylesheet or source when the parser permits DTDs: Note: Hardened parsers disable external DTDs — failure here does not disprove other XSLT vectors (see §3). --- 3. FILE READ VIA document() document() loads another XML document into a node-set; local files often parse as XML (noisy) but errors and partial reads may still leak. Unix example: Windows example: SSRF / out-of-band: Chain with error-based or timing observations if inline data does not return to the client. --- 4. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills yaklang/xslt-injection