XSLT
Extensible Stylesheet Language Transformations
Extensible Stylesheet Language Transformations (XSLT) is an XML-based language usually used to transform XML documents into HTML, other XML, or PDF. The attack can occur when arbitrary loading of XSLT files is possible or when an application dynamically generates the XSL transformation XML document using non-user-validated input. Currently, there are 3 ( 1, 2, 3 ) XSLT versions. Version 1 is the least vulnerable due to limited built-in functionality.
Example
Saxon with XSLT version 2
sudo apt install default-jdk libsaxon-java libsaxonb-javaFile
To see the results, we use the command-line parser
saxonb-xslt -xsl:transformation.xsl catalogue.xmlFind Underlying Preprocessor
They refer to the example above.
detection.xsl
fingerprinting.xsl
Attacks
Depending on the preprocessor, we can consult the XSLT documentation for that version to identify the functions of interest. Such as
Read File
unparsed-text
Java
SSRF
xsl:include
Write File
RCE
Java
Wordlist for brute-forcing functionality.
Last updated
Was this helpful?