Detail CWE-776

CWE-776

Improper Restriction of Recursive Entity References in DTDs
2009-07-27
00h00 +00:00
Sedang
Draft
2026-10-28
00h00 +00:00
Notifikasi untuk CWE tertentu
Tetap terinformasi tentang perubahan untuk CWE tertentu.
Kelola notifikasi

Nama: Improper Restriction of Recursive Entity References in DTDs

The product uses XML documents and allows their structure to be defined with a Document Type Definition (DTD), but it does not properly control the number of recursive definitions of entities.

Informasi Umum

Mode Pengenalan

Implementation
Operation

Platform yang Berlaku

Bahasa

Kelas: Not Language-Specific (Undetermined)
Nama: XML (Undetermined)

Teknologi

Kelas: Not Technology-Specific (Undetermined)

Konsekuensi Umum

Cakupan Dampak Kemungkinan
AvailabilityDoS: Resource Consumption (Other)

Catatan: If the DTD contains a large number of nested or recursive entities, this allows the attacker to expand data exponentially when the DTD is parsed, quickly consuming all system resources.

Contoh yang Diamati

Referensi Deskripsi

CVE-2008-3281

XEE in XML-parsing library.

CVE-2011-3288

XML bomb / XEE in enterprise communication product.

CVE-2011-1755

"Billion laughs" attack in XMPP server daemon.

CVE-2009-1955

XML bomb in web server module

CVE-2003-1564

Parsing library allows XML bomb

Mitigasi yang Memungkinkan

Phases : Operation
If possible, prohibit the use of DTDs or use an XML parser that limits the expansion of recursive DTD entities.
Phases : Implementation
Before parsing XML files with associated DTDs, scan for recursive entity declarations and do not continue parsing potentially explosive content.

Metode Deteksi

Automated Static Analysis

Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Efektivitas : High

Catatan Pemetaan Kerentanan

Justifikasi : This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
Komentar : Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.

Pola Serangan Terkait

CAPEC ID Nama Pola Serangan
CAPEC-197 Exponential Data Expansion
An adversary submits data to a target application which contains nested exponential data expansion to produce excessively large output. Many data format languages allow the definition of macro-like structures that can be used to simplify the creation of complex structures. However, this capability can be abused to create excessive demands on a processor's CPU and memory. A small number of nested expansions can result in an exponential growth in demands on memory.

Referensi

REF-676

Multiple vendors XML parser (and SOAP/WebServices server) Denial of Service attack using DTD
Amit Klein.
https://seclists.org/fulldisclosure/2002/Dec/229

REF-677

XML security: Preventing XML bombs
Rami Jaamour.
http://searchsoftwarequality.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid92_gci1168442,00.html?asrc=SS_CLA_302%20%20558&psrc=CLT_92#

REF-678

Dismantling an XML-Bomb
Didier Stevens.
https://blog.didierstevens.com/2008/09/23/dismantling-an-xml-bomb/

REF-679

XML Entity Expansion
Robert Auger.
http://projects.webappsec.org/w/page/13247002/XML%20Entity%20Expansion

REF-680

Tip: Configure SAX parsers for secure processing
Elliotte Rusty Harold.
https://web.archive.org/web/20101005080451/http://www.ibm.com/developerworks/xml/library/x-tipcfsx.html

REF-500

XML Denial of Service Attacks and Defenses
Bryan Sullivan.
https://learn.microsoft.com/en-us/archive/msdn-magazine/2009/november/xml-denial-of-service-attacks-and-defenses

REF-682

Preventing Entity Expansion Attacks in JAXB
Blaise Doughan.
http://blog.bdoughan.com/2011/03/preventing-entity-expansion-attacks-in.html

Pengajuan

Nama Organisasi Tanggal Tanggal rilis Version
CWE Content Team MITRE 2009-06-30 +00:00 2009-07-27 +00:00 1.5

Modifikasi

Nama Organisasi Tanggal Komentar
CWE Content Team MITRE 2010-02-16 +00:00 updated Taxonomy_Mappings
CWE Content Team MITRE 2010-12-13 +00:00 updated Relationships
CWE Content Team MITRE 2011-06-01 +00:00 updated Common_Consequences
CWE Content Team MITRE 2012-05-11 +00:00 updated Demonstrative_Examples
CWE Content Team MITRE 2013-02-21 +00:00 updated Alternate_Terms, Applicable_Platforms, Description, Name, Observed_Examples, References, Relationships
CWE Content Team MITRE 2017-11-08 +00:00 updated Likelihood_of_Exploit, References
CWE Content Team MITRE 2018-03-27 +00:00 updated Relationships
CWE Content Team MITRE 2019-06-20 +00:00 updated Relationships, Type
CWE Content Team MITRE 2020-02-24 +00:00 updated Applicable_Platforms, Relationships
CWE Content Team MITRE 2021-10-28 +00:00 updated Relationships
CWE Content Team MITRE 2022-04-28 +00:00 updated Related_Attack_Patterns
CWE Content Team MITRE 2023-01-31 +00:00 updated Description
CWE Content Team MITRE 2023-04-27 +00:00 updated Detection_Factors, References, Relationships
CWE Content Team MITRE 2023-06-29 +00:00 updated Mapping_Notes
CWE Content Team MITRE 2025-12-11 +00:00 updated Applicable_Platforms, Relationships, Weakness_Ordinalities
CWE Content Team MITRE 2026-10-28 +00:00 updated Common_Consequences, Description, Name