Join our Newsletter — 33% off our NHI Course

What breaks when SOAP services still process external entities in XML requests?

When SOAP services process external entities, attackers can force the parser to fetch local files or remote DTDs during XML handling. That can expose sensitive server data, trigger error-based exfiltration, and extend the impact across multiple endpoints that share the same parser behavior. Disabling DTD processing and validating XML inputs are the most reliable controls.

Why External Entity Processing Turns SOAP Into a Data Exposure Problem

SOAP is often treated as a structured, enterprise-friendly protocol, but its XML parser is still a security boundary. When external entity resolution remains enabled, the parser can follow references outside the document and disclose data the service never intended to read. That moves the issue beyond malformed input and into file disclosure, parser-driven outbound requests, and trust boundary failure. The risk is especially important where SOAP sits behind shared middleware, because one parser weakness can affect many operations at once. In practice, many teams only discover the problem after a routine integration test or error message exposes that the parser is still resolving entities.

The most relevant fix is not to rely on the SOAP layer itself to “sanitize” XML, because the vulnerability exists before business logic sees the request. Parser configuration, DTD handling, and input validation must be enforced at the XML processing stage. For teams using shared libraries or inherited platform defaults, the real question is whether every service instance inherits the same unsafe behaviour. That matters because a single overlooked default can create a repeatable exposure across an entire integration estate.

How It Works in Practice

External entities are a feature of XML that let a document refer to content defined elsewhere. In a SOAP request, that can seem harmless until the parser is allowed to dereference local files or remote resources while expanding the XML. If the service processes those references before application controls run, the attacker has a path to coerce the server into reading data, generating errors, or making outbound requests that reveal environment details.

The practical failure mode usually depends on three conditions: the parser accepts XML with entity resolution enabled, the service processes attacker-controlled XML before strict validation, and the runtime has access to files or network locations worth reaching. Even when the service blocks obvious outbound traffic, local file reads can still leak through error handling, response differences, or logging. In a clustered or heavily reused SOAP stack, the impact can repeat across multiple endpoints if they share the same XML library configuration.

  • Disable DTD processing wherever the parser supports that setting.
  • Reject XML that depends on external entity expansion rather than trying to “clean” it after parsing.
  • Use hardened parser defaults consistently across every SOAP endpoint and integration tier.
  • Test both direct responses and error paths, because leakage often appears only when parsing fails.

Where this guidance breaks down is in environments that rely on legacy XML features for internal interoperability, because partial exceptions often reintroduce the same parser behaviour through a back door.

Common Variations and Edge Cases

Tighter XML parsing often increases compatibility work, because legacy integrations may depend on document type definitions or older middleware defaults. Teams have to balance interoperability against the much higher cost of parser-driven disclosure, especially when a shared service layer supports multiple business functions.

Some environments reduce the risk without fully eliminating XML usage by placing the parser behind a restricted transform layer, but that only helps if the parser itself never resolves external references. A common mistake is assuming that network egress controls make the issue go away; local file disclosure and error-based leakage can still occur even when outbound access is limited. Another edge case is platform inheritance, where the SOAP application is secure in isolation but deployed onto a runtime that silently re-enables entity processing through library defaults. The safest interpretation is that entity resolution should be treated as unsafe unless the entire parsing chain has been explicitly verified.

For teams comparing parser hardening across integration estates, the practical decision is whether a compatibility exception is worth the disclosure risk. When the answer is uncertain, the exception should be treated as a security issue, not an integration preference.

Risk and Threat Considerations

External entity handling creates a classic XML injection exposure: the attacker is not attacking SOAP business logic directly, but the parser that processes the request. That makes the weakness attractive because it can reveal local data, generate outbound lookups, and expose parser behaviour across multiple services that share the same XML stack.

Failure mechanism: The parser expands attacker-supplied entity references before the request reaches normal application controls, allowing file disclosure, remote fetches, or error-based data leakage through trusted parsing behaviour.

Impact: Sensitive server files, configuration data, and internal parser details can be exposed, and the same weakness can repeat across many SOAP endpoints if the unsafe configuration is reused.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK address the attack and risk surface, while CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
MITRE ATT&CK T1106 — Native API Entity expansion abuses parser behavior to access system resources.
Recommendation — Harden XML parsers and hunt for requests that trigger unexpected file or network access.
CIS Controls v8 16 — Application Software Security SOAP entity processing is a software-input handling flaw needing secure defaults.
8 — Audit Log Management Parser errors and suspicious fetches may reveal exploitation attempts.
Recommendation — Disable external entity resolution and test XML handling in the deployed application stack. Log parser errors and monitor for repeated entity-resolution failures or unexpected outbound lookups.
NIST CSF 2.0 PR.PT-1 — Protective Technology Secure platform settings should prevent unsafe XML parser behavior.
Recommendation — Configure XML processing to block DTD and entity expansion by default.

Practitioner Guidance

What to verify: Confirm that entity resolution is disabled in the actual runtime, not just documented in code review or design notes. Teams should test the deployed parser path, because configuration drift between environments is a common reason this issue survives remediation.

Common mistake: Treating XML validation as a substitute for parser hardening. Validation helps only after the parser has safely accepted the input; if entity expansion happens first, the exposure has already occurred.

What good looks like: SOAP services reject XML that depends on external entities, shared parser settings are hardened by default, and error handling does not reveal file paths, DTD references, or fetch attempts. The strongest signal is consistency across every endpoint, not isolated success in one service.

Practitioner takeaway: This is fundamentally a parser-trust problem, so the control objective is to remove unsafe XML behaviour at the platform layer before any SOAP processing or business validation can be influenced.