CVE-2020-8167: CSRF

Published Jun 19, 2020
·
Updated

A CSRF vulnerability exists in rails <= 6.0.3 rails-ujs module that could allow attackers to send CSRF tokens to wrong domains.

Other sources

There is a 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 >= 5.2.4.3, rails >= 6.0.3.1

Impact ------

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.

Workarounds -----------

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:

linkto params

to code like this:

linkto filteredparams

def filteredparams # Filter just the parameters that you trust end

Affected Software

6 affected componentsFixes available
rubygems/actionview>=6.0.0<=6.0.3
6.0.3.1
rubygems/actionview>=5.0.0<=5.2.4.2
5.2.4.3
debian/rails
2:5.2.2.1+dfsg-1+deb10u32:5.2.2.1+dfsg-1+deb10u52:6.0.3.7+dfsg-2+deb11u22:6.1.7.3+dfsg-12:6.1.7.3+dfsg-2
rubyonrails Rails<5.2.4.3
rubyonrails Rails>=6.0.0<6.0.3.1
Debian Debian Linux=10.0

Event History

Jun 19, 2020
CVE Published
via MITRE·05:16 PM
Data Sourced
via MITRE·05:16 PM
DescriptionWeakness
Jul 7, 2020
Advisory Published
04:34 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the vulnerability ID for the CSRF vulnerability in rails-ujs?

The vulnerability ID for the CSRF vulnerability in rails-ujs is CVE-2020-8167.

2

What is the affected version of rails-ujs?

The affected version of rails-ujs is <= 6.0.3.

3

How can attackers exploit the CSRF vulnerability in rails-ujs?

Attackers can exploit the CSRF vulnerability in rails-ujs by sending CSRF tokens to wrong domains.

4

Which versions of rails fix the CSRF vulnerability in rails-ujs?

The versions rails >= 5.2.4.3 and rails >= 6.0.3.1 fix the CSRF vulnerability in rails-ujs.

5

What is the impact of the CSRF vulnerability in rails-ujs?

The CSRF vulnerability in rails-ujs can lead to Cross-Site Request Forgery attacks.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203