CSRF Vulnerability in jquery-ujs

Metadata

medium
5.0
jquery-ujs
CVE-2015-1840
groups.google.com
2015-06-16
2017-06-16 19:14
CVE-2015-1840 ruby-jquery-rails
CSRF Vulnerability in jquery-rails
CVE-2015-1840
2017-04-01 19:10
2017-01-05 20:15

Description

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.

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
end

See also:
- http://blog.honeybadger.io/understanding-the-rails-jquery-csrf-vulnerability-cve-2015-1840/

Am I vulnerable?

The constraints below list the versions that this vulnerability is patched in, and versions that are unaffected. If a patch is ready but unrealeased, then it is pending.

Or, you can just let us figure it out for you! Appcanary continously monitor your installed packages, and tell you if any of them are vulnerable.

Sign up for monitoring

Affected package information

Package Patched in Unaffected in
jquery-ujs >= 1.0.4 None