Bug 909528 (CVE-2013-0276)

Summary: CVE-2013-0276 rubygem-activerecord/rubygem-activemodel: circumvention of attr_protected
Product: [Other] Security Response Reporter: Kurt Seifried <kseifried>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bkabrda, bkearney, bleanhar, ccoleman, cpelland, dajohnso, dmcphers, jeckersb, jialiu, jomara, lmeyer, mastahnke, mmccune, morazi, msuchy, sclewis, security-response-team, tkramer, vanmeeuwen+fedora, vondruch
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: impact=moderate,public=20130211,reported=20130208,source=upstream,cvss2=5.0/AV:N/AC:L/Au:N/C:N/I:P/A:N,cloudformscommon-1/rubygem-activemodel=wontfix,sam-1/rubygem-activemodel=affected,openshift-enterprise-1/rubygem-activemodel=affected,openshift-enterprise-1/ruby193-rubygem-activemodel=affected,openshift-1/rubygem-activemodel=affected,openshift-1/ruby193-rubygem-activemodel=affected,fedora-all/rubygem-activemodel=affected,epel-5/rubygem-activerecord=affected
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-15 00:25:29 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On: 909530, 909531, 909532, 909533, 948705, 948706, 995668    
Bug Blocks: 909529, 917836    
Attachments:
Description Flags
2-3-attr_protected-cve-2013-0276.patch
none
3-0-attr_protected-cve-2013-0276.patch
none
3-1-attr_protected-cve-2013-0276.patch
none
3-2-attr_protected-cve-2013-0276.patch none

Description Kurt Seifried 2013-02-09 03:37:19 EST
Aaron Patterson (tenderlove@ruby-lang.org) reports:

Circumvention of attr_protected

There is a vulnerability in the attr_protected method in ActiveRecord. This 
vulnerability has been assigned the CVE identifier CVE-2013-0276.

Versions Affected:  All.
Not affected:       Applications using attr_accessible
Fixed Versions:     3.2.12, 3.1.11

Impact 
------
The attr_protected method allows developers to specify a blacklist of model 
attributes which users should not be allowed to assign to.  By using a 
specially crafted request, attackers could circumvent this protection and 
alter values that were meant to be protected.

All users running an affected release should either upgrade or use one of the 
work arounds immediately.  Users should also consider switching from 
attr_protected to the whitelist method attr_accessible which is not vulnerable 
to this attack.

Releases 
-------- 
The FIXED releases are available at the normal locations. 

Workarounds 
----------- 
The only feasible work around for this issue is to convert the application to 
use attr_accessible instead of attr_protected.

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. 

* 3-2-attr_protected.patch - Patch for 3.2 series 
* 3-1-attr_protected.patch - Patch for 3.1 series 
* 3-0-attr_protected.patch - Patch for 3.0 series
* 2-3-attr_protected.patch - Patch for 2.3 series

Please note that only the 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 joernchen of Phenoelit and Ryan Koppenhaver of Matasano Security for 
reporting the vulnerability to us and working closely with us on a fix.
Comment 6 Kurt Seifried 2013-02-11 14:55:43 EST
Created attachment 696260 [details]
2-3-attr_protected-cve-2013-0276.patch
Comment 7 Kurt Seifried 2013-02-11 14:55:59 EST
Created attachment 696261 [details]
3-0-attr_protected-cve-2013-0276.patch
Comment 8 Kurt Seifried 2013-02-11 14:56:15 EST
Created attachment 696262 [details]
3-1-attr_protected-cve-2013-0276.patch
Comment 9 Kurt Seifried 2013-02-11 14:56:30 EST
Created attachment 696263 [details]
3-2-attr_protected-cve-2013-0276.patch
Comment 11 Vít Ondruch 2013-02-12 06:28:56 EST
Could you please create tracking bug for Fedora? Thank you.
Comment 13 Kurt Seifried 2013-02-13 05:21:01 EST
This code is in active_record in 2.3 and in activemodel in version 3.0/3.1/3.2, updated title and whiteboard to reflect this.
Comment 15 Fedora Update System 2013-02-21 00:37:52 EST
rubygem-activemodel-3.2.8-2.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 16 Fedora Update System 2013-02-21 00:38:05 EST
rubygem-activemodel-3.0.11-3.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 17 Vincent Danen 2013-03-06 18:42:04 EST
This issue has been addressed in following products:

  RHEL 6 Version of OpenShift Enterprise

Via RHSA-2013:0582 https://rhn.redhat.com/errata/RHSA-2013-0582.html
Comment 18 errata-xmlrpc 2013-03-26 15:18:30 EDT
This issue has been addressed in following products:

  Red Hat Subscription Asset Manager 1.2

Via RHSA-2013:0686 https://rhn.redhat.com/errata/RHSA-2013-0686.html
Comment 19 Kurt Seifried 2013-04-05 03:25:35 EDT
Created rubygem-activemodel tracking bugs for this issue

Affects: fedora-all [bug 948705]
Comment 20 Kurt Seifried 2013-04-05 03:26:27 EDT
Created rubygem-activerecord tracking bugs for this issue

Affects: epel-5 [bug 948706]
Comment 21 Kurt Seifried 2013-07-26 02:21:04 EDT
The Red Hat Security Response Team has rated this issue as having moderate security impact in CloudForms 1.1. This issue is not currently planned to be addressed in future updates.