
Xslt Injection
This playbook walks you through exploiting XSLT injection when you control stylesheet input on a server-side transform. It starts with processor fingerprinting (Xalan, Saxon, libxslt, MSXML) then maps out the escalation paths: XXE via DTD entities, file reads through document(), EXSLT write primitives for arbitrary file creation, and platform-specific RCE surfaces in PHP (php:function with system calls), Java (Runtime.exec via extension namespaces), and .NET (msxsl:script blocks). The coverage is thorough and includes working payloads for each vector. Use this when you see parameters like stylesheet, transform, or template in XML processing endpoints. Most modern setups disable the nastiest features, so you'll often end up pivoting to document() SSRF or read-only XXE rather than full RCE, but the skill covers both scenarios.
- skills.sh installs
- 3.8K
- GitHub stars
- 2.6K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add yaklang/hack-skills --skill xslt-injection --agent claude-codeInstalls into .claude/skills of the current project.
Files
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 outbounddocument(http:...)requests, cross-loadssrf-server-side-request-forgery.
0. QUICK START
- Find sinks: parameters named
xslt,stylesheet,transform,template, SOAP stylesheets, report generators, XML→HTML converters. - Probe reflection: inject unique namespace or
xsl:value-of select="'marker'"— if output changes, execution likely. - Fingerprint processor (§1).
- Escalate by family: document() / XXE (§2–3), EXSLT write (§4), PHP (§5), Java (§6), .NET (§7).
Quick probe (harmless marker):
Sponsors
Details
- Repository
- github.com/yaklang/hack-skills
- Categories
- Testing & QA, Java & JVM, PHP & Laravel, .NET & C#
- First seen
- Jun 3, 2026
More from yaklang/hack-skills
All 102- Type Juggling3.8K
- Linux Lateral Movement3.8K
- Container Escape Techniques3.8K
- Classical Cipher Analysis3.7K
- Linux Security Bypass3.7K
- Tunneling And Pivoting3.7K
- Prototype Pollution Advanced3.7K
- Steganography Techniques3.7K
- Smart Contract Vulnerabilities3.7K
- Stack Overflow And Rop3.7K
- Rsa Attack Techniques3.7K
- Sandbox Escape Techniques3.7K
- Lattice Crypto Attacks3.7K
- Symmetric Cipher Attacks3.7K
- Windows Lateral Movement3.7K
- Macos Security Bypass3.7K
- Ntlm Relay Coercion3.7K
- Nosql Injection3.7K
- Macos Process Injection3.7K
- Upload Insecure Files3.7K
- Unauthorized Access Common Services3.6K
- Reverse Shell Techniques3.6K
- Ghost Bits Cast Attack3.5K
- Hack4.6K