Skip to content
XXE Write-up Advanced

Data Exfiltration through Blind XXE on PDF Generator

A PDF generator used a vulnerable XML parser (PDFreactor before 10.1.1) that allowed blind XXE injection. An attacker with a low-privileged account could exfiltrate local files such as /etc/passwd by sending crafted XML in the htmlBody parameter, bypassing a firewall that only allowed outbound port 443.

Arben Shala Follow

Published on arben.sh

In this post, I will explain how I found a Blind XXE injection on PDF Generator that was vulnerable to CVE-2019-12154. However, in order to exfilftrate data, I had to bypass some WAF restrictions.

Arben Shala (@arbennsh), on arben.sh

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

Root cause

Likely the PDFreactor XML parser was configured to resolve external entities and DTDs, allowing file reads and outbound connections.

What the attacker needed

A low-privileged account; two attacker-controlled servers with public IPs; ability to intercept and modify requests

The fix

The text recommends keeping software up to date and having proper WAF rules in place; upgrading PDFreactor to version 10.1.1 or later would also fix the underlying vulnerability.

How it was found

  1. Set up two attacker-controlled servers: one HTTP server hosting a malicious DTD file and one FTP server listening on port 443.
  2. Log in with a low-privileged account and navigate to the report generation page.
  3. Intercept the PDF download request and replace the htmlBody parameter with XML that references the external DTD.
  4. Send the request; the server fetches the DTD, reads /etc/passwd, and sends its contents to the FTP server.
  5. Observe the exfiltrated data arriving on the FTP server.

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 elsewhere. If a parser is badly configured, it will fetch a file from the server's own disk or contact an attacker's server. Here the PDF generator did that, so the attacker could read files on the server and send their contents out through a hidden channel.

What is XXE?

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

More by Arben Shala

View all

2 more disclosed reports, best first.

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.