CWE-112

Missing XML Validation

Medium

Description

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

Potential Impact

How to Fix

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

Related Weaknesses

References

View on MITRE CWE Database →

Need Help Fixing This Vulnerability?

Our security experts can help you identify and remediate CWE-112 vulnerabilities in your codebase.

Get Security Assessment