Secure code review · Jan 28, 2024

Finding XML Vulnerabilities in Code

How insecure XML parsing creates exploitable application behavior and what engineering teams can do about it.

Research notes

Questions that turn guidance into a review.

Use these prompts to challenge assumptions, collect evidence, and make the article actionable for engineering and security teams.

Review questions
  1. Where can untrusted XML reach a parser, including indirect file and document formats?
  2. Does the parser process DTDs, external entities, XInclude, XSLT, or remote schemas?
  3. Can parser behavior reach local files, internal services, or excessive resource consumption?
  4. Are content type, payload size, schema, and parser configuration enforced consistently?
Evidence and signals
  • SOAP, SAML, SVG, office document, upload, and integration code paths
  • External entity resolution, blind callbacks, error differences, and local file references
  • Entity expansion, deeply nested input, oversized payloads, and parser timeouts
  • Language-specific secure parser settings and tests that prevent regression
Primary references

References support the review approach; they do not replace architecture-specific threat modeling or validation.

Start with a focused conversation

Ready to test what matters before attackers do?

Tell us what you are building, changing, or concerned about. We will help you define the right security review.