Bug 892777 (CVE-2014-3514) - VUL-0: CVE-2014-3514: rubygem-activerecord-2_3, rubygem-activerecord-3_2: Strong Parameter bypass with create_with
Summary: VUL-0: CVE-2014-3514: rubygem-activerecord-2_3, rubygem-activerecord-3_2: Str...
Status: VERIFIED FIXED
Alias: CVE-2014-3514
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P5 - None : Major
Target Milestone: ---
Assignee: Marcus Rückert
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/105154/
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-20 14:12 UTC by Alexander Bergmann
Modified: 2014-08-20 14:17 UTC (History)
2 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Bergmann 2014-08-20 14:12:57 UTC
Via rh#1131240:

Rafael Mendonça França reports:

There is a vulnerability in the create_with method in Active Record. This
vulnerability has been assigned the CVE identifier CVE-2014-3514.

Versions Affected:  4.0.0 and All Later Versions.
Not affected:       Versions earlier than 4.0.0
Fixed Versions:     4.0.9 4.1.5

Impact
------
The create_with functionality in Active Record was implemented incorrectly
and completely bypasses the strong parameters protection.  Applications
which pass user-controlled values to create_with could allow attackers to
set arbitrary attributes on models.

All users running an affected release should either upgrade or use one of
the workarounds immediately.

Releases
--------
The 4.0.9 and 4.1.5 releases are available at the normal locations.

Workarounds
-----------
To avoid this vulnerability you will have to either remove all calls to
create_with, or carefully audit your codebase to ensure it sanitizes the
input first.  For example you should replace code like this:

  user.blog_posts.create_with(params[:blog_post]).create

with either:

  user.blog_posts.create(params[:blog_post])

or:

  user.blog_posts.create_with(params[:blog_post].permit(:title, :body,
:etc)).create


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.

* 4-1-create_with.patch - Patch for 4.1 series
* 4-0-create_with.patch - Patch for 4.0 series

Please note that only the 4.0.x and 4.1.x series receive regular security
updates 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 earlier releases.

Credits
-------

Thanks to Stephen Touset of Square for reporting the vulnerability to us,
and to Jeff Jarmoc of Matasano and Charlie Somerville of GitHub for helping
verify the patches and advisories.


References:
https://bugzilla.redhat.com/show_bug.cgi?id=1131240
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-3514
http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-3514
Comment 1 Alexander Bergmann 2014-08-20 14:17:33 UTC
The rubygem-activerecord 4.0.x and 4.1.x series is not used in any SLE or openSUSE product. Closing bug.