CAPECattack pattern

CAPEC-146 XML Schema Poisoning

High Official page ↗
Abstraction
Detailed
Status
Stable
Likelihood of attack
Low
Typical severity
High
CAPEC version
3.9

Description

An adversary corrupts or modifies the content of XML schema information passed between a client and server for the purpose of undermining the security of the target. XML Schemas provide the structure and content definitions for XML documents. Schema poisoning is the ability to manipulate a schema either by replacing or modifying it to compromise the programs that process documents that use this schema.

Execution flow

1. [Explore] [Determine if XML schema is local or remote] Because this attack differs slightly if the target uses remote XML schemas versus local schemas, the adversary first needs to determine which of the two are used. 2. [Experiment] [Gain access to XML schema] The adversary gains access to the XML schema so that they can modify the contents. 3. [Exploit] [Poison XML schema] Once the adversary gains access to the XML schema, they will alter it to achieve a desired effect. Locally, they can simply modify the file. For remote schemas, the adversary will alter the schema in transit by performing an adversary in the middle attack.

Prerequisites

• Some level of access to modify the target schema. • The schema used by the target application must be improperly secured against unauthorized modification and manipulation.

Consequences

• Availability: Unreliable Execution, Resource Consumption • Integrity: Modify Data • Confidentiality: Read Data

Mitigations

• Design: Protect the schema against unauthorized modification. • Implementation: For applications that use a known schema, use a local copy or a known good repository instead of the schema reference supplied in the XML document. Additionally, ensure that the proper permissions are set on local files to avoid unauthorized modification. • Implementation: For applications that leverage remote schemas, use the HTTPS protocol to prevent modification of traffic in transit and to avoid unauthorized modification.

Related

Child of · CAPEC (1)

Weakness · CWE (2)

  • CWE-15 External Control of System or Configuration Setting weakness
  • CWE-472 External Control of Assumed-Immutable Web Parameter weakness

Referenced by CWE · attack pattern (2)

  • CWE-15 External Control of System or Configuration Setting weakness
  • CWE-472 External Control of Assumed-Immutable Web Parameter weakness