yaklang avatar

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-code

Installs 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 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):

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
1yaklang avatarupload-insecure-filesyaklang/hack-skillsInsecure file upload playbook. Use when testing upload validation, storage paths, processing pipelines, preview behavior, overwrite risks, and upload-to-RCE cha3.7Kskills.sh installs
2sanyuan0704 avatarbook-studysanyuan0704/sanyuan-skillsReading coach: guides users through books systematically with knowledge compilation, mastery testing, spaced repetition, and knowledge querying. Use when user s3.6Kskills.sh installs
3wondelai avatarsteve-jobs-design-reviewwondelai/skillsReview designs, products, and features with Steve Jobs' standards: ruthless simplicity, focus, and end-to-end excellence. Use when the user mentions "Steve Jobs3.6Kskills.sh installs
4github avatarautoresearchgithub/awesome-copilotAutonomous iterative experimentation loop for any programming task. Guides the user through defining goals, measurable metrics, and scope constraints, then runs3.4Kskills.sh installs
5arize-ai avatararize-experimentarize-ai/arize-skillsCreates, runs, and analyzes Arize experiments for evaluating and comparing model performance. Covers experiment CRUD, exporting runs, comparing results, and eva3.2Kskills.sh installs
6dpearson2699 avatarcarplaydpearson2699/swift-ios-skillsBuild CarPlay-enabled apps using the CarPlay framework. Use when creating navigation, audio, communication, EV charging, parking, or food ordering apps for the 3.2Kskills.sh installs