Umbra Wiki attack-pattern attack-pattern/CAPEC-228
Back to wiki

CAPEC-228 — DTD Injection

provenance: imported · CWE: CWE-829

CAPEC-228: DTD Injection

MITRE CAPEC attack pattern

Status Draft
Typical severity Medium
Likelihood of attack
Catalogue CAPEC 3.9 (2023-01-24)

Description

An attacker injects malicious content into an application's DTD in an attempt to produce a negative technical impact. DTDs are used to describe how XML documents are processed. Certain malformed DTDs (for example, those with excessive entity expansion as described in CAPEC 197) can cause the XML parsers that process the DTDs to consume excessive resources resulting in resource depletion.

Where this sits in the chain

A finding maps to a weakness (CWE), a weakness is exploited by an attack pattern (CAPEC), and an attack pattern shows up in ATT&CK as observed adversary behaviour. This page is the middle hop.

Weaknesses exploited: CWE-829

Prerequisites

  • The target must be running an XML based application that leverages DTDs.

Mitigations

  • Design: Sanitize incoming DTDs to prevent excessive expansion or other actions that could result in impacts like resource depletion.
  • Implementation: Disallow the inclusion of DTDs as part of incoming messages.
  • Implementation: Use XML parsing tools that protect against DTD attacks.

Source