CWE-827 — Improper Control of Document Type Definition
CWE-827: Improper Control of Document Type Definition
MITRE CWE weakness
| Kind | Weakness |
| Abstraction | Variant |
| Status | Incomplete |
| Likelihood of exploit | — |
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.
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
- Availability: DoS: Resource Consumption (CPU), DoS: Resource Consumption (Memory)
- Integrity, Confidentiality, Availability, Access Control: Execute Unauthorized Code or Commands, Gain Privileges or Assume Identity
Mitigations
(none listed)
References
- CWE page: https://cwe.mitre.org/data/definitions/827.html
- CWE list: https://cwe.mitre.org/data/index.html