Bug 1301957 (CVE-2015-7577) - CVE-2015-7577 rubygem-activerecord: Nested attributes rejection proc bypass in Active Record
Summary: CVE-2015-7577 rubygem-activerecord: Nested attributes rejection proc bypass i...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2015-7577
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 1301959 1301960 1306282 1306283 1306284 1306285 1306286 1306287
Blocks: 1302006
TreeView+ depends on / blocked
 
Reported: 2016-01-26 12:45 UTC by Adam Mariš
Modified: 2019-09-29 13:43 UTC (History)
57 users (show)

Fixed In Version: rubygem-activerecord 5.0.0.beta1.1, rubygem-activerecord 4.2.5.1, rubygem-activerecord 4.1.14.1, rubygem-activerecord 3.2.22.1
Doc Type: Bug Fix
Doc Text:
A flaw was found in the Active Record component's handling of nested attributes in combination with the destroy flag. An attacker could possibly use this flaw to set attributes to invalid values or clear all attributes.
Clone Of:
Environment:
Last Closed: 2016-03-15 21:21:35 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:0296 normal SHIPPED_LIVE Important: rh-ror41 security update 2016-02-24 15:36:00 UTC
Red Hat Product Errata RHSA-2016:0454 normal SHIPPED_LIVE Important: ror40 security update 2016-03-16 00:56:17 UTC
Red Hat Product Errata RHSA-2016:0455 normal SHIPPED_LIVE Important: ruby193 security update 2016-03-16 00:55:59 UTC

Description Adam Mariš 2016-01-26 12:45:58 UTC
There was reported a vulnerability in how the nested attributes feature in Active Record handles updates in combination with destroy flags when destroying records is disabled. When using the nested attributes feature in Active Record you can prevent the destruction of associated records by passing the `allow_destroy: false` option to the `accepts_nested_attributes_for` method. However due to a change in the commit [a9b4b5d][1] the `_destroy` flag prevents the `:reject_if` proc from being called because it assumes that the record will be destroyed anyway. However if `:allow_destroy` is false this leads to changes that would have been rejected being applied to the record. Attackers could use this do things like set attributes to invalid values and to clear all of the attributes amongst other things. The severity will be dependent on how the application has used this feature.

Versions affected are 3.1.0 and newer. 

External References:

https://groups.google.com/forum/#!msg/rubyonrails-security/cawsWcQ6c8g/tegZtYdbFQAJ
http://weblog.rubyonrails.org/2016/1/25/Rails-5-0-0-beta1-1-4-2-5-1-4-1-14-1-3-2-22-1-and-rails-html-sanitizer-1-0-3-have-been-released/

Comment 2 Adam Mariš 2016-01-26 12:47:29 UTC
Created rubygem-activerecord tracking bugs for this issue:

Affects: fedora-all [bug 1301960]

Comment 3 Adam Mariš 2016-01-26 15:23:14 UTC
Acknowledgments:

Red Hat would like to thank Ruby on Rails project for reporting this issue.
Upstream acknowledges Justin Coyne as the original reporter.

Comment 8 errata-xmlrpc 2016-02-24 10:37:10 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6

Via RHSA-2016:0296 https://rhn.redhat.com/errata/RHSA-2016-0296.html

Comment 9 Fedora Update System 2016-02-28 08:24:11 UTC
rubygem-activerecord-4.2.0-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2016-02-28 12:24:24 UTC
rubygem-activerecord-4.2.3-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 errata-xmlrpc 2016-03-15 21:00:17 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS

Via RHSA-2016:0455 https://rhn.redhat.com/errata/RHSA-2016-0455.html

Comment 12 errata-xmlrpc 2016-03-15 21:03:11 UTC
This issue has been addressed in the following products:

  Red Hat Software Collections for Red Hat Enterprise Linux 7.2 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 7
  Red Hat Software Collections for Red Hat Enterprise Linux 7.1 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6
  Red Hat Software Collections for Red Hat Enterprise Linux 6.7 EUS
  Red Hat Software Collections for Red Hat Enterprise Linux 6.6 EUS

Via RHSA-2016:0454 https://rhn.redhat.com/errata/RHSA-2016-0454.html


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