引入方式
Implementation
Operation
適用平台
程式語言
類別: Not Language-Specific (Undetermined)
名稱: XML (Undetermined)
技術
類別: Not Technology-Specific (Undetermined)
常見後果
| 範圍 |
影響 |
可能性 |
| Availability | DoS: Resource Consumption (Other)
注意: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. | |
觀察到的案例
| 參考資料 |
描述 |
| 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 |
潛在緩解措施
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.
偵測方法
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.)
有效性 : High
漏洞對應備注
理由說明 : 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.
備註 : 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.
相關攻擊模式
| CAPEC ID |
攻擊模式名稱 |
| 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. |
參考資料
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
提交
| 名稱 |
機構 |
日期 |
發布日期 |
Version |
| CWE Content Team |
MITRE |
2009-06-30 +00:00 |
2009-07-27 +00:00 |
1.5 |
修改記錄
| 名稱 |
機構 |
日期 |
備註 |
| 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 |