XSLT Injection

Processing an un-validated XSL stylesheet can allow an attacker to change the structure and contents of the resultant XML, include arbitrary files from the file system, or execute arbitrary code

Summary

Tools

No known tools currently exist to assist with XSLT exploitation.

Methodology

Determine the Vendor and Version

External Entity

Don't forget to test for XXE when you encounter XSLT files.

Read Files and SSRF Using Document

Write Files with EXSLT Extension

EXSLT, or Extensible Stylesheet Language Transformations, is a set of extensions to the XSLT (Extensible Stylesheet Language Transformations) language. EXSLT, or Extensible Stylesheet Language Transformations, is a set of extensions to the XSLT (Extensible Stylesheet Language Transformations) language.

Remote Code Execution with PHP Wrapper

Execute the function readfile.

Execute the function scandir.

Execute a remote php file using assert

Execute a PHP meterpreter using PHP wrapper.

Execute a remote php file using file_put_contents

Remote Code Execution with Java

Remote Code Execution with Native .NET

Labs

References

Last updated