Bugzilla – Bug 934795
VUL-0: CVE-2015-1840: rubygem-jquery-rails: CSRF Vulnerability in jquery-ujs and jquery-rails
Last modified: 2016-04-27 19:39:54 UTC
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:
to code like this:
# 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.
bugbot adjusting priority
rubygem-jquery-rails is in the cloud5 development project, but not on the DVD.
But it might be bundled.
rubygem-jquery-rails is maintained on openSUSE 13.1 and 13.2
It is also in devel:languages:ruby:extensions
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
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
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