Bug 914716 (CVE-2013-1821)

Summary: CVE-2013-1821 ruby: entity expansion DoS vulnerability in REXML
Product: [Other] Security Response Reporter: Vincent Danen <vdanen>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: aneelica, bkabrda, bleanhar, ccoleman, djorm, dmcphers, jbpapp-maint, jdetiber, jeremy, jialiu, jkeck, jlieskov, joelsmith, jokerman, jstribny, kseifried, lmeyer, mgoldman, mmccomas, mmcgrath, mmorsi, mtasaka, nwallace, pavelp, soa-p-jira, s, tagoh, tcunning, tkramer, vanmeeuwen+fedora, vondruch, weli
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: ruby 1.9.3-p392, ruby 2.0.0-p0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-03 04:52:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 914726, 915377, 915378, 915379, 915380, 948673, 948674, 974094, 978174    
Bug Blocks: 914727, 958335, 978151, 980652, 981152    

Description Vincent Danen 2013-02-22 15:46:31 UTC
An unrestricted entity expansion flaw was reported in Ruby that can lead to a denial of service in REXML.  When reading text nodes from an XML document, the REXML parser could be coerced into allocating extremely large string objects which could consume all available memory on the system.

Impacted code would look similar to the following:

document = REXML::Document.new some_xml_doc
document.root.text

In this case, when the 'text' method is called, entities will be expanded.  An attacker could send a relatively small XML document that, when the entities were resolved, would consume extremely large amounts of memory on the target system.  It is noted that this vulnerability is similar to the 'Billion Laughs' attack, and is also related to CVE-2013-1664 (Python).

The upstream advisory has a work-around patch that limits the size of entity substitutions.


External References:

http://www.ruby-lang.org/en/news/2013/02/22/rexml-dos-2013-02-22/

Comment 1 Vincent Danen 2013-02-22 16:03:22 UTC
This is fixed upstream in version 1.9.3p392 and svn r39384:

http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=39384

Comment 2 Vincent Danen 2013-02-22 16:06:45 UTC
Created ruby tracking bugs for this issue

Affects: fedora-all [bug 914726]

Comment 6 Stefan Cornelius 2013-03-06 18:43:45 UTC
This has been assigned CVE-2013-1821.
http://www.openwall.com/lists/oss-security/2013/03/06/5

Comment 7 errata-xmlrpc 2013-03-07 18:59:03 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 6

Via RHSA-2013:0612 https://rhn.redhat.com/errata/RHSA-2013-0612.html

Comment 8 errata-xmlrpc 2013-03-07 18:59:45 UTC
This issue has been addressed in following products:

  Red Hat Enterprise Linux 5

Via RHSA-2013:0611 https://rhn.redhat.com/errata/RHSA-2013-0611.html

Comment 13 errata-xmlrpc 2013-07-09 17:37:35 UTC
This issue has been addressed in following products:

  Fuse ESB Enterprise 7.1.0

Via RHSA-2013:1028 https://rhn.redhat.com/errata/RHSA-2013-1028.html

Comment 14 errata-xmlrpc 2013-08-08 17:09:12 UTC
This issue has been addressed in following products:

  Red Hat JBoss SOA Platform 5.3.1

Via RHSA-2013:1147 https://rhn.redhat.com/errata/RHSA-2013-1147.html

Comment 15 errata-xmlrpc 2013-08-29 23:29:00 UTC
This issue has been addressed in following products:

  Red Hat JBoss Fuse 6.0.0

Via RHSA-2013:1185 https://rhn.redhat.com/errata/RHSA-2013-1185.html