Bug 934795 - (CVE-2015-1840) VUL-0: CVE-2015-1840: rubygem-jquery-rails: CSRF Vulnerability in jquery-ujs and jquery-rails
VUL-0: CVE-2015-1840: rubygem-jquery-rails: CSRF Vulnerability in jquery-ujs ...
Classification: Novell Products
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents
Other Other
: P3 - Medium : Normal
: ---
Assigned To: Security Team bot
Security Team bot
Depends on:
  Show dependency treegraph
Reported: 2015-06-15 19:44 UTC by Andreas Stieger
Modified: 2016-04-27 19:39 UTC (History)
4 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Stieger 2015-06-15 19:44:38 UTC
CRD 2015-06-16

CSRF Vulnerability in jquery-ujs and jquery-rails

There is an vulnerability in jquery-ujs and jquery-rails that can be used to
bypass CSP protections and allows attackers to send CSRF tokens to attacker domains.

This vulnerability has been assigned the CVE identifier CVE-2015-1840.

Versions Affected:  All.
Not affected:       Applications which don't use jquery-ujs or jquery-rails.
Fixed Versions:     jquery-rails versions 4.0.4 and 3.1.3 and jquery-ujs 1.0.4.

In the scenario where an attacker might be able to control the href attribute of an anchor tag or
the action attribute of a form tag that will trigger a POST action, the attacker can set the
href or action to " https://attacker.com" (note the leading space) that will be passed to JQuery,
who will see this as a same origin request, and send the user's CSRF token to the attacker domain.

The FIXED releases are available at the normal locations.

To work around this problem, change code that allows users to control the href attribute of an anchor
tag or the action attribute of a form tag to filter the user parameters.

For example, code like this:

    link_to params

to code like this:

    link_to filtered_params

    def filtered_params
      # Filter just the parameters that you trust

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

* 1-0-3-jquery_ujs_csrf.patch - Patch for jquery-ujs 1.0.3.

* 3-1-2-jquery-rails-csrf.patch - Patch for jquery-rails 3.1.2.
* 4-0-3-jquery-rails-csrf.patch - Patch for jquery-rails 4.0.3.


Thanks to Ben Toews of GitHub for reporting the vulnerability to us, and working with us on a fix.
Comment 4 Andreas Stieger 2015-06-15 19:46:13 UTC
CRD: 2015-06-16
Comment 5 Swamp Workflow Management 2015-06-15 22:00:49 UTC
bugbot adjusting priority
Comment 6 Andreas Stieger 2015-06-16 18:35:25 UTC
Comment 7 Marcus Meissner 2015-06-17 12:22:51 UTC
rubygem-jquery-rails is in the cloud5 development project, but not on the DVD.

But it might be bundled.
Comment 8 Jordi Massaguer 2015-07-01 12:12:24 UTC
rubygem-jquery-rails is maintained on openSUSE 13.1 and 13.2

It is also in devel:languages:ruby:extensions
Comment 11 Bernhard Wiedemann 2015-07-09 12:00:11 UTC
This is an autogenerated message for OBS integration:
This bug (934795) was mentioned in
https://build.opensuse.org/request/show/315675 13.2+13.1 / rubygem-jquery-rails
Comment 12 Swamp Workflow Management 2015-07-17 15:08:06 UTC
openSUSE-SU-2015:1260-1: An update that fixes one vulnerability is now available.

Category: security (moderate)
Bug References: 934795
CVE References: CVE-2015-1840
Sources used:
openSUSE 13.2 (src):    rubygem-jquery-rails-3.1.1-2.3.1
openSUSE 13.1 (src):    rubygem-jquery-rails-3.0.4-2.3.1
Comment 13 Marcus Meissner 2016-03-22 16:18:11 UTC