Skip to main content
XML External Entity (XXE) injection occurs when an XML parser processes external entity references in user-supplied XML input, potentially allowing file reads, SSRF, and remote code execution.

Basic Entity Test

Read Local Files

Directory Listing (Java)

SSRF via XXE

Blind SSRF with Parameter Entities

Out-of-Band Data Exfiltration

Host a malicious DTD at your server:
Then trigger it:

Error-Based Data Extraction (External DTD)

Error-Based Using System DTD (Blind with No Outbound)

Hidden XXE Surfaces

When you can’t modify the DOCTYPE but control data within server-generated XML:
Unzip a DOCX/XLSX and inject XXE in word/document.xml. Rezip and upload to trigger server-side parsing.
Some servers accept both JSON and XML. Try changing Content-Type: application/json to Content-Type: text/xml and convert the body to XML with an XXE payload.
XLIFF is XML-based. Some translation tools parse uploaded XLIFF files server-side:

DoS Attacks

WAF Bypasses

Java XMLDecoder RCE

Java Hardening

Python lxml XXE (< 5.4.0)

Tools