CWEweakness

CWE-112 Missing XML Validation

Official page ↗
Abstraction
Base
Structure
Simple
Status
Draft
Languages
Not Language-Specific
CWE version
5.0

Description

The product accepts XML from an untrusted source but does not validate the XML against the proper schema.

Common consequences

• Integrity: Unexpected State, Varies by Context — By accepting an XML document without validating it against a DTD or XML schema, the programmer leaves a door open for attackers to provide unexpected, unreasonable, or malicious input.

Potential mitigations

• [Architecture and Design] Always validate XML input against a known XML Schema or DTD. It is not possible for an XML parser to validate all aspects of a document's content because a parser cannot understand the complete semantics of the data. However, a parser can do a complete and thorough job of checking the document's structure and therefore guarantee to the code that processes the document that the content is well-formed.

Detection methods

• Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

Related

Attack pattern · CAPEC (2)

  • CAPEC-230 Serialized Data with Nested Payloads attack pattern
  • CAPEC-231 Oversized Serialized Data Payloads attack pattern

Child of · CWE (2)

  • CWE-1286 Improper Validation of Syntactic Correctness of Input weakness
  • CWE-20 Improper Input Validation weakness

Referenced by CAPEC · weakness (2)

  • CAPEC-230 Serialized Data with Nested Payloads attack pattern
  • CAPEC-231 Oversized Serialized Data Payloads attack pattern

Referenced by CVE · weakness (8)

  • CVE-2026-1190 A flaw was found in Keycloak's SAML brokering functionality. vulnerability
  • CVE-2025-68493 Missing XML Validation vulnerability in Apache Struts, Apache Struts. vulnerability
  • CVE-2023-40310 SAP PowerDesigner Client - version 16.7, does not sufficiently validate BPMN2 XML document imported from an untrusted source. vulnerability
  • CVE-2021-27780 The software may be vulnerable to both Un-Auth XML interaction and unauthenticated device enrollment. vulnerability
  • CVE-2022-28213 When a user access SOAP Web services in SAP BusinessObjects Business Intelligence Platform - version 420, 430, it does not sufficiently… vulnerability
  • CVE-2021-1359 A vulnerability in the configuration management of Cisco AsyncOS for Cisco Web Security Appliance (WSA) could allow an authenticated,… vulnerability
  • CVE-2020-27282 In Hamilton Medical AG,T1-Ventillator versions 2.2.3 and prior, an XML validation vulnerability in the ventilator allows privileged… vulnerability
  • CVE-2020-1975 Missing XML validation vulnerability in the PAN-OS web interface on Palo Alto Networks PAN-OS software allows authenticated users to inject… vulnerability

Referenced by OWASP · mapped cwe (1)