CVSS v3.x: 6.5 (Medium)
- ~> 5.2.4, >= 188.8.131.52
- >= 184.108.40.206
There is an vulnerability in rails-ujs that allows attackers to send CSRF tokens to wrong domains.
Versions Affected: rails <= 6.0.3 Not affected: Applications which don’t use rails-ujs. Fixed Versions: rails >= 220.127.116.11, rails >= 18.104.22.168
This is a regression of CVE-2015-1840.
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 a cross-origin URL, and the CSRF token will be sent.
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:
link_to filtered_params def filtered_params # Filter just the parameters that you trust end