Injection Attacks: The Complete 2020 Guide

XXE Injections - Overview

Disable DTDs, External Entities, and External DTDs

Disable DTDs completely

If you can't, then you should at least disable external entities and external DTDs

Disable DTDs, External Entities, and External DTDs

Disabling depends on the parser and language being used...

For PHP, you could do it with:


libxml_disable_entity_loader(true);

Disable DTDs, External Entities, and External DTDs

Verify XML file uploads

Use alternatives to XML

ie: JSON or YAML

Find XXE vulnerabilities in your apps

Automated tools:

  • OWASP ZAP
  • Burp Suite

Manual review:

  • Look for XML uploads or inclusions
  • Test those areas
Made with Slides.com