What’s Vulnerable › Vulnerabilities
CVE-2020-8166: Ability to forge per-form CSRF tokens in Rails
- Severity: medium (CVSS 4.3 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 1.7% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2020-07-02 · updated 2026-06-17
- Weakness: CWE-352
Description
A CSRF forgery vulnerability exists in rails < 5.2.5, rails < 6.0.4 that makes it possible for an attacker to, given a global CSRF token such as the one present in the authenticity_token meta tag, forge a per-form CSRF token.
Affected products
- Debian Linux: 10.0
- Ruby on Rails: before 5.2.4.3; from 6.0.0 before 6.0.3.1 — fixed in 5.2.4.3, 6.0.3.1
- Rubygems Actionpack: from 5.0.0 before 5.2.4.3; from 6.0.0 before 6.0.3.1; 5.0.0, 5.0.0.1, 5.0.1, 5.0.1.rc1, 5.0.1.rc2, 5.0.2 (+59) — fixed in 5.2.4.3, 6.0.3.1
How to fix
Upgrade to a fixed version: Ruby on Rails 5.2.4.3, 6.0.3.1; Rubygems Actionpack 5.2.4.3, 6.0.3.1. Check the vendor advisory for mitigations.
References
- https://groups.google.com/g/rubyonrails-security/c/NOjKiGeXUgw
- https://hackerone.com/reports/732415
- https://www.debian.org/security/2020/dsa-4766
- https://groups.google.com/g/rubyonrails-security/c/NOjKiGeXUgw
- https://hackerone.com/reports/732415
- https://www.debian.org/security/2020/dsa-4766
- https://hackerone.com/reports/732415
Get alerted when CVE-2020-8166 or the next vulnerability affects your stack