Bug 903440 (CVE-2013-0333) - CVE-2013-0333 rubygem-activesupport: json to yaml parsing
Summary: CVE-2013-0333 rubygem-activesupport: json to yaml parsing
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2013-0333
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 903443 903444 903445 903446 905373 905374 905375 905376 995677 1165357
Blocks: 903448
TreeView+ depends on / blocked
 
Reported: 2013-01-24 01:48 UTC by Kurt Seifried
Modified: 2019-09-29 12:59 UTC (History)
27 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 905666 (view as bug list)
Environment:
Last Closed: 2018-02-01 17:37:54 UTC


Attachments (Terms of Use)
ror-2-3-json-parser-CVE-2013-0333.patch (19.12 KB, patch)
2013-01-24 02:46 UTC, Kurt Seifried
no flags Details | Diff
ror-3-0-json-parser-CVE-2013-0333.patch (19.44 KB, patch)
2013-01-24 02:47 UTC, Kurt Seifried
no flags Details | Diff
Updated patch (for 3.0 version) from upstream to fix this issue (see previous comment) (22.88 KB, patch)
2013-01-28 08:25 UTC, Jan Lieskovsky
no flags Details | Diff
For easier reading diff the diffs (to see what got changed) (7.02 KB, text/plain)
2013-01-28 08:33 UTC, Jan Lieskovsky
no flags Details


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0201 normal SHIPPED_LIVE Critical: rubygem-activesupport security update 2013-01-29 04:13:30 UTC
Debian BTS 699226 None None None Never
Red Hat Product Errata RHSA-2013:0202 normal SHIPPED_LIVE Critical: rubygem-activesupport security update 2013-01-29 04:13:22 UTC
Red Hat Product Errata RHSA-2013:0203 normal SHIPPED_LIVE Critical: rubygem-activesupport security update 2013-01-29 10:07:05 UTC

Description Kurt Seifried 2013-01-24 01:48:26 UTC
The Ruby on Rails project reports:

Vulnerability in JSON Parser in Ruby on Rails 3.0 and 2.3

There is a vulnerability in the JSON  code for Ruby on Rails which allows 
attackers to bypass authentication systems, inject arbitrary SQL, inject and 
execute arbitrary code, or perform a DoS attack on a Rails application. This 
vulnerability has been assigned the CVE identifier CVE-2013-0333.

Versions Affected:  2.3.x, 3.0.x
Not Affected:       3.1.x, 3.2.x
Fixed Versions:     3.0.20, 2.3.16

Impact
------
The JSON Parsing code in Rails 2.3 and 3.0 support multiple parsing backends. 
One of the backends involves transforming the JSON into YAML, and passing that 
through the YAML parser.  Using a specially crafted payload attackers can trick
the backend into decoding a subset of YAML.

Note: This is a seperate vulnerability to CVE-2013-0156, if you are running a 
2.3 or 3.0 application you must still take action to protect your application.

Releases
--------
The 3.0.20 and 2.3.16 releases are available at the normal locations.

Workarounds
-----------
To work around this vulnerability you need to switch backends to the JsonGem 
backend.  Place this code in an application initializer:

  ActiveSupport::JSON.backend = "JSONGem"

If you are running Ruby 1.8 you will need to ensure that the json or json_pure 
gems are installed and in your application's Gemfile.  Ruby 1.9 includes this 
code already.

Patches
-------
To aid users who aren't able to upgrade immediately we have provided patches 
for the two supported release series.  They are in git-am format and consist 
of a single changeset.

* 2-3-json-parser.patch - Patch for 2.3 series
* 3-0-json-parser.patch - Patch for 3.0 series

Please note that only the 2.3.x, 3.1.x and 3.2.x series are supported at 
present.  Users of earlier unsupported releases are advised to upgrade as soon 
as possible as we cannot guarantee the continued availability of security 
fixes for unsupported releases.

Credits
-------

Thanks to Lawrence Pit of Mirror42 for discovering the vulnerability and 
working responsibly with us to ensure we shipped a fix.

Comment 6 Kurt Seifried 2013-01-24 02:46:43 UTC
Created attachment 686419 [details]
ror-2-3-json-parser-CVE-2013-0333.patch

Comment 7 Kurt Seifried 2013-01-24 02:47:15 UTC
Created attachment 686420 [details]
ror-3-0-json-parser-CVE-2013-0333.patch

Comment 9 Murray McAllister 2013-01-24 23:57:46 UTC
Acknowledgements:

Red Hat would like to thank Ruby on Rails upstream for reporting this issue. Upstream acknowledges Lawrence Pit of Mirror42 as the original reporter.

Comment 27 Jan Lieskovsky 2013-01-28 08:25:40 UTC
Created attachment 688771 [details]
Updated patch (for 3.0 version) from upstream to fix this issue (see previous comment)

Comment 28 Jan Lieskovsky 2013-01-28 08:33:32 UTC
Created attachment 688784 [details]
For easier reading diff the diffs (to see what got changed)

Comment 30 Ivan Necas 2013-01-28 10:04:02 UTC
Fast check against scratch build (https://brewweb.devel.redhat.com/taskinfo?taskID=5326330) with new patch from upstream looks ok.

Comment 37 Vincent Danen 2013-01-28 21:41:31 UTC
External References:

http://weblog.rubyonrails.org/2013/1/28/Rails-3-0-20-and-2-3-16-have-been-released/

Comment 38 errata-xmlrpc 2013-01-28 23:14:38 UTC
This issue has been addressed in following products:

  RHEL 6 Version of OpenShift Enterprise

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

Comment 39 errata-xmlrpc 2013-01-28 23:14:48 UTC
This issue has been addressed in following products:

  Red Hat Subscription Asset Manager 1.1

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

Comment 42 errata-xmlrpc 2013-01-29 05:07:53 UTC
This issue has been addressed in following products:

  CloudForms for RHEL 6

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

Comment 43 Vít Ondruch 2013-01-29 07:56:34 UTC
Can we get tracking bug for F16/F17? Thank you.

Comment 44 Jan Lieskovsky 2013-01-29 09:36:31 UTC
Created rubygem-activesupport tracking bugs for this issue

Affects: epel-5 [bug 905373]
Affects: epel-6 [bug 905374]
Affects: fedora-16 [bug 905375]
Affects: fedora-17 [bug 905376]

Comment 45 Jan Lieskovsky 2013-01-29 13:20:19 UTC
External References:

https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/1h2DR63ViGo

Comment 46 Fedora Update System 2013-02-10 04:28:04 UTC
rubygem-activesupport-3.0.10-6.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 47 Fedora Update System 2013-02-10 04:38:30 UTC
rubygem-activesupport-3.0.11-8.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 49 Eric Christensen 2014-05-27 17:44:56 UTC
The EPEL 6 version is 2.3.8-2 so I'm guessing that's still affected.

The EPEL 5 version is 2.1.1-2 so I'm not clear that that version is affected by this vulnerability.


Note You need to log in before you can comment on or make changes to this bug.