Description
XML External Entity (XXE) injection occurs when an application parses untrusted XML input with external entity processing enabled. An attacker can define malicious external entities to read local files, perform server-side request forgery (SSRF), cause denial of service, or exfiltrate sensitive data. This typically happens when XML parsers allow DTDs and external entities without proper restrictions.
Recommendation
To mitigate XXE vulnerabilities, disable external entity resolution and DTD processing in XML parsers unless explicitly required. Use secure parser configurations such as disabling network access and entity expansion. Validate and sanitize all XML input from untrusted sources, and prefer alternative data formats like JSON when possible.
References
Could your website be exposed too?
SmartScanner can check your website for XML External Entity Injection (XXE) and gives you actionable findings to investigate.
Start a free scanRelated Issues
- @cyclonedx/cyclonedx-library Improper Restriction of XML External Entity Reference vulnerability - CVE-2024-34345
- Remote URL Inclusion - Vulnerability
- Server-Side Request Forgery - Vulnerability
- Possible Server-Side Request Forgery - Vulnerability


