CWE-827: Improper Control of Document Type Definition
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.
Last updated
Overview
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.
Real-world CVEs
1 recorded CVEs are caused by CWE-827 (Improper Control of Document Type Definition). The highest-severity and most recent are shown first. 0 new CWE-827 CVEs have been recorded so far in 2026 (1 in 2025).
Common consequences
What can happen when CWE-827 is exploited.
Read Files or Directories
Affects: Confidentiality
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.
DoS: Resource Consumption (CPU), DoS: Resource Consumption (Memory)
Affects: Availability
The DTD may cause the parser to consume excessive CPU cycles or memory using techniques such as nested or recursive entity references (CWE-776).
Execute Unauthorized Code or Commands, Gain Privileges or Assume Identity
Affects: Integrity, Confidentiality, Availability, Access Control
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.
How it happens
When it is introduced
Typically introduced during these phases of the software lifecycle.
Applies to
Languages
Illustrative examples
Real CVEs that MITRE cites as examples of this weakness.
- 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.
Frequently asked questions
Common questions about CWE-827.
- What is CWE-827?
- 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.
- What CVEs are caused by CWE-827?
- 1 recorded CVEs are attributed to CWE-827, including CVE-2025-4949.
- What are the consequences of CWE-827?
- Exploiting CWE-827 can lead to: Read Files or Directories, DoS: Resource Consumption (CPU), DoS: Resource Consumption (Memory), Execute Unauthorized Code or Commands, Gain Privileges or Assume Identity.
- Is CWE-827 actively exploited?
- 1 recorded CVEs are caused by CWE-827; none are currently in CISA's KEV catalog of actively exploited flaws.
References
- MITRE CWE definition (CWE-827) (opens in a new tab)
- CWE-827 vulnerabilities on NVD (opens in a new tab)
- Learn: What is a CWE?
Weakness data is sourced from the MITRE CWE catalog (v4.20). CVE associations are aggregated and kept current by RadicalNotion.AI.
Stay ahead of CWE-827
Get alerted the moment a new CWE-827 vulnerability affects your stack, with AI-written analysis, severity context, and remediation guidance.