Skip to content
XXE Write-up Intermediate

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…

Jerry Shah (Jerry), on medium.com

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

  1. Create a taskflow and select a notification design.
  2. In the email body properties, choose the formula option to open the expression editor.
  3. Enter a Saxon expression that decodes and parses a crafted XML payload referencing an external DTD.
  4. Host a malicious DTD file on a controlled server.
  5. 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.

Similar reports

View all

Same bug class and techniques, clearest first.

XML external entities (XXE)

The lesson behind this report.

An XML parser resolves entities the attacker defines, reading local files or making the server send requests.