Các cách xuất hiện
Implementation
Operation
Nền tảng áp dụng
Ngôn ngữ
Lớp: Not Language-Specific (Undetermined)
Tên: XML (Undetermined)
Công nghệ
Lớp: Not Technology-Specific (Undetermined)
Hậu quả phổ biến
| Phạm vi |
Tác động |
Khả năng xảy ra |
| Availability | DoS: Resource Consumption (Other)
Ghi chú: 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. | |
Ví dụ đã quan sát
| Tài liệu tham khảo |
Mô tả |
| XEE in XML-parsing library. |
| XML bomb / XEE in enterprise communication product. |
| "Billion laughs" attack in XMPP server daemon. |
| XML bomb in web server module |
| Parsing library allows XML bomb |
Các biện pháp giảm thiểu tiềm năng
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.
Phương pháp phát hiện
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.)
Hiệu quả : High
Ghi chú ánh xạ lỗ hổng
Lý do : 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.
Bình luận : 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.
Mẫu tấn công liên quan
| ID CAPEC |
Tên mẫu tấn công |
| 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. |
Tài liệu tham khảo
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
Gửi
| Tên |
Tổ chức |
Ngày |
Ngày phát hành |
Version |
| CWE Content Team |
MITRE |
2009-06-30 +00:00 |
2009-07-27 +00:00 |
1.5 |
Sửa đổi
| Tên |
Tổ chức |
Ngày |
Bình luận |
| 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 |