Bugzilla – Bug 805236
VUL-0: CVE-2013-0340/CVE-2013-0341: expat: entity expansion DoS/exploits
Last modified: 2021-05-24 10:48:07 UTC
is public, via oss-security and other researchers From: Kurt Seifried <kseifried@redhat.com> Subject: [oss-security] CVEs for libxml2 and expat internal and external XML entity expansion Date: Thu, 21 Feb 2013 22:44:40 -0700 So here are the CVE's for the two big ones, libxml2 and expat. Both are affected by the expansion of internal entities (which can be used to consume resources) and external entities (which can cause a denial of service against other services, be used to port scan, etc.). To be clear: ==================== Internal entity expansion refers to the exponential/quadratic/fast linear expansion of XML entities, e.g.: ==================== <!DOCTYPE xmlbomb [ <!ENTITY a "1234567890" > <!ENTITY b "&a;&a;&a;&a;&a;&a;&a;&a;"> <!ENTITY c "&b;&b;&b;&b;&b;&b;&b;&b;"> <!ENTITY d "&c;&c;&c;&c;&c;&c;&c;&c;"> ]> <bomb>&d;</bomb> or <!DOCTYPE bomb [ <!ENTITY a "xxxxxxx... a couple of ten thousand chars"> ]> <bomb>&a;&a;&a;... repeat</bomb> Which causes resources to be consumed ==================== External entity expansion refers to the loading of external resources such as XML entities from another server or a local file: ==================== <!DOCTYPE external [ <!ENTITY ee SYSTEM "http://www.example.org/some.xml"> ]> <root>ⅇ</root> <!DOCTYPE external [ <!ENTITY ee SYSTEM "file:///PATH/TO/simple.xml"> ]> <root>ⅇ</root> Which can cause resources to be consumed or can result in port scanning /application scanning information being sent to the attacker. So the CVE's to use: Please use CVE-2013-0340 for expat internal entity expansion Please use CVE-2013-0341 for expat external entities expansion
as for libxml2, we need to decide: - do we change the default settings of expat? should probably more done by upstream - or do we change the behaviour of the using libraries/programs
bugbot adjusting priority
To avoid breaking applications by a library change, we are defering this problem to the users of expat. They can mitigate this issue by calling the XML_SetEntityDeclHandler() function with the name of an alternative function that can handle entities more safely. We will not fix these issues in expat at this time.