XML External Entity (XXE) injection occurs when an application parses untrusted XML and allows external entities or document type definitions to be resolved. Depending on the parser and configuration, an attacker may cause the server to read local files, make requests to internal services, or consume excessive resources. The primary defense is to disable DTD processing and external entity resolution for untrusted XML. If DTDs are genuinely required, restrict external resources, apply parser-specific hardening and set strict resource limits. Security testers should validate the exact parser and library configuration in an authorised environment; XXE is often a configuration problem, not simply an XML syntax issue. Source: OWASP Foundation.