CWEweakness

CWE-827 Improper Control of Document Type Definition

Official page ↗
Abstraction
Variant
Structure
Simple
Status
Incomplete
Languages
XML
CWE version
5.0

Description

The product does not restrict a reference to a Document Type Definition (DTD) to the intended control sphere. This might allow attackers to reference arbitrary DTDs, possibly causing the product to expose files, consume excessive system resources, or execute arbitrary http requests on behalf of the attacker.

Extended description

As DTDs are processed, they might try to read or include files on the machine performing the parsing. If an attacker is able to control the DTD, then the attacker might be able to specify sensitive resources or requests or provide malicious content. For example, the SOAP specification prohibits SOAP messages from containing DTDs.

Common consequences

• Confidentiality: Read Files or Directories — If the attacker is able to include a crafted DTD and a default entity resolver is enabled, the attacker may be able to access arbitrary files on the system. • Availability: DoS: Resource Consumption (CPU), DoS: Resource Consumption (Memory) — The DTD may cause the parser to consume excessive CPU cycles or memory using techniques such as nested or recursive entity references (CWE-776). • Integrity, Confidentiality, Availability, Access Control: Execute Unauthorized Code or Commands, Gain Privileges or Assume Identity — The DTD may include arbitrary HTTP requests that the server may execute. This could lead to other attacks leveraging the server's trust relationship with other entities.

Observed examples

• CVE-2010-2076: Product does not properly reject DTDs in SOAP messages, which allows remote attackers to read arbitrary files, send HTTP requests to intranet servers, or cause a denial of service.

Related

Observed example · CVE (1)

  • CVE-2010-2076 Apache CXF 2.0.x before 2.0.13, 2.1.x before 2.1.10, and 2.2.x before 2.2.9, as used in Apache ServiceMix, Apache Camel, Apache Chemistry,… vulnerability

Can precede · CWE (1)

  • CWE-776 Improper Restriction of Recursive Entity References in DTDs weakness

Child of · CWE (2)

  • CWE-706 Use of Incorrectly-Resolved Name or Reference weakness
  • CWE-829 Inclusion of Functionality from Untrusted Control Sphere weakness

Referenced by CVE · weakness (3)

  • CVE-2026-15803 In Eclipse RDF4J, several XML parser entry points do not fully restrict XML External Entity (XXE) processing when parsing untrusted… vulnerability
  • CVE-2025-4949 In Eclipse JGit versions 7.2.0.202503040940-r and older, the ManifestParser class used by the repo command and the AmazonS3 class used to… vulnerability
  • CVE-2024-9044 A XML External Entity (XXE) vulnerability has been identified in Easy Tax Client Software 2023 1.2 and earlier across multiple platforms,… vulnerability