BERRY9 IT SERVICES

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

XXE in Enterprise Integrations, SAML & Document Parsers architecture and testing overview

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);

Hidden XXE Vectors in Uploads, SOAP & SAML

Hidden XXE entry points in modern applications
Feature / FormatUnderlying XML RiskTest Method
SVG / DOCX / XLSX UploadsZIP-based Office files and SVGs contain parsed XMLInject benign DTD/entity references inside uploaded SVG or document.xml
JSON APIs Accepting XMLFrameworks fall back to XML parser if Content-Type changesReplay JSON POST with Content-Type: application/xml
SOAP & Payment GatewaysLegacy XML endpoints with external DTD enabledCheck parser error responses and out-of-band resolution
RSS / Feed ImportersServer fetches and parses external XML feedsTest entity expansion and external schema fetch restrictions

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.