XXE in Enterprise Integrations, SAML & Document Parsers
Where XML External Entity (XXE) vulnerabilities still hide in 2026: DOCX/XLSX/SVG uploads, SOAP/banking APIs, and SAML parsers.
Web & App Security · By Thimmagurudu Bathini, CTO · Published · 5 min read
Why XML Parsers Still Run Behind JSON APIs
Even though modern APIs favor JSON, XML External Entity (XXE) vulnerabilities remain common inside document parsers (.docx, .xlsx, .svg), SAML SSO handlers, and legacy SOAP or banking gateways. A single unhardened XML parser can leak local server files, cloud IMDS credentials, or trigger internal SSRF.
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
dbf.setFeature("http://xml.org/sax/features/external-general-entities", false);
dbf.setXIncludeAware(false);
dbf.setExpandEntityReferences(false);Probing Parsers Without Accessing Host Files
- Test every file upload accepting SVG, DOCX, XLSX, or KML for XML parser entity resolution.
- Switch Content-Type from application/json to application/xml on API endpoints to spot hidden XML deserializers.
- Verify XML parsers disable DOCTYPE declarations and external entity resolution completely.
- Check for XML Billion Laughs (entity expansion) denial-of-service protections.
Disabling DTDs Across Server Libraries
Disable DOCTYPE declarations and external general/parameter entities across all XML parser libraries (e.g., setFeature DISALLOW_DOCTYPE_DECL in Java).
Test document uploads, SAML handlers, and enterprise XML gateways from ₹36,000 + 18% GST. Request a scoped proposal →
XXE Security Testing Questions
Can JSON-only apps still be vulnerable to XXE?
Yes—if they process SVG avatars, Excel/Word imports, SAML assertions, or accept application/xml Content-Types.
How do you test XXE safely?
We use non-destructive test markers and isolated staging verification without accessing live host secrets.