Cross-site Request Forgery (CSRF) Affecting jquery-rails package, versions >=0.1.1, <3.1.3>=3.2.0, <4.0.4


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
4.99% (93rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Cross-site Request Forgery (CSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RUBY-JQUERYRAILS-20225
  • published15 Jun 2015
  • disclosed15 Jun 2015
  • creditBen Toews

Introduced: 15 Jun 2015

CVE-2015-1840  (opens in a new tab)
CWE-352  (opens in a new tab)

How to fix?

Upgrade jquery-rails to versions 3.1.3, 4.0.4 or higher.

Overview

jquery-rails provides jQuery and the jQuery-ujs driver for your Rails 4+ application.

Affected versions allow a CSRF attack with a maliciously crafted anchor element. 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). This will be passed to JQuery, and be treated as a same origin request, potentially send the user's CSRF token to the attacker domain.

CVSS Scores

version 3.1