Cross-site Request Forgery (CSRF) Affecting jquery-rails package, versions <3.1.3 >=4.0.0, <4.0.4
Snyk CVSS
Threat Intelligence
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 ID SNYK-RUBY-JQUERYRAILS-575390
- published 24 Jun 2015
- disclosed 24 Jun 2015
- credit Ben Toews of GitHub
Introduced: 24 Jun 2015
CVE-2015-1840 Open this link in a new tabHow to fix?
Upgrade jquery-rails
to version 3.1.3, 4.0.4 or higher.
Overview
jquery-rails is a gem provides jQuery and the jQuery-ujs driver for your Rails 4+ application.
Affected versions of this package are vulnerable to Cross-site Request Forgery (CSRF). It can be used to bypass CSP protections and allows attackers to send CSRF tokens to attacker domains. 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.