XXE - The Saxon Hunt
The application used the Saxon XML parser to process user-supplied XML without disabling external entity resolution, allowing an attacker to read local files. By hosting a malicious DTD and injecting a crafted expression, the attacker could force the contents of /etc/passwd into a parser error message.
medium.com
Published on medium.com
XML external entity injection (also known as XXE) is a web security vulnerability that allows an attacker to interfere with an application’s processing of XML data. It often allows an attacker to view files on the application server filesystem, and to interact with any back-end or external systems that the application…
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could read arbitrary local files accessible to the application, potentially exposing sensitive system information that could aid further attacks.
What the attacker needed
Access to taskflow creation; ability to host a DTD on a server
The fix
External entity resolution should be explicitly disabled in the Saxon XML parser configuration, including preventing processing of external DTDs and parameter entities.
How it was found
- Create a taskflow and select a notification design.
- In the email body properties, choose the formula option to open the expression editor.
- Enter a Saxon expression that decodes and parses a crafted XML payload referencing an external DTD.
- Host a malicious DTD file on a controlled server.
- Run the task; it fails and the error message contains the contents of /etc/passwd.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
XML allows documents to define 'entities' that pull in content from other places. If a parser is allowed to fetch external files, an attacker can make it read sensitive files on the server. Here, the attacker tricked the parser into including a local file's contents in an error message, which they could then see.
What is XXE?
An XML parser resolves entities the attacker defines, reading local files or making the server send requests.