结构: Simple
Abstraction: Base
状态: Draft
被利用可能性: Medium
The software 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.
If the DTD contains a large number of nested or recursive entities, this can lead to explosive growth of data when parsed, causing a denial of service.
cwe_Nature: ChildOf cwe_CWE_ID: 674 cwe_View_ID: 1000 cwe_Ordinal: Primary
cwe_Nature: ChildOf cwe_CWE_ID: 674 cwe_View_ID: 1003 cwe_Ordinal: Primary
cwe_Nature: ChildOf cwe_CWE_ID: 674 cwe_View_ID: 699 cwe_Ordinal: Primary
cwe_Nature: ChildOf cwe_CWE_ID: 409 cwe_View_ID: 1000
cwe_Nature: ChildOf cwe_CWE_ID: 409 cwe_View_ID: 699
Language: {'cwe_Name': 'XML', 'cwe_Prevalence': 'Undetermined'}
Paradigm: {'cwe_Name': 'Web Based', 'cwe_Prevalence': 'Undetermined'}
范围 | 影响 | 注释 |
---|---|---|
Availability | DoS: Resource Consumption (Other) | If parsed, recursive entity references allow the attacker to expand data exponentially, quickly consuming all system resources. |
策略:
If possible, prohibit the use of DTDs or use an XML parser that limits the expansion of recursive DTD entities.
策略:
Before parsing XML files with associated DTDs, scan for recursive entity declarations and do not continue parsing potentially explosive content.
The DTD and the very brief XML below illustrate what is meant by an XML bomb. The ZERO entity contains one character, the letter A. The choice of entity name ZERO is being used to indicate length equivalent to that exponent on two, that is, the length of ZERO is 2^0. Similarly, ONE refers to ZERO twice, therefore the XML parser will expand ONE to a length of 2, or 2^1. Ultimately, we reach entity THIRTYTWO, which will expand to 2^32 characters in length, or 4 GB, probably consuming far more data than expected.
attack XML
标识 | 说明 | 链接 |
---|---|---|
CVE-2008-3281 | XEE in XML-parsing library. | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-3281 |
CVE-2011-3288 | XML bomb / XEE in enterprise communication product. | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-3288 |
CVE-2011-1755 | "Billion laughs" attack in XMPP server daemon. | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-1755 |
CVE-2009-1955 | XML bomb in web server module | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-1955 |
CVE-2003-1564 | Parsing library allows XML bomb | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2003-1564 |
映射的分类名 | ImNode ID | Fit | Mapped Node Name |
---|---|---|---|
WASC | 44 | XML Entity Expansion |