What’s Vulnerable › Vulnerabilities
CVE-2021-22904: Possible DoS Vulnerability in Action Controller Token Authentication
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 4.9% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2021-06-11 · updated 2026-06-17
- Weakness: CWE-400
Description
The actionpack ruby gem before 6.1.3.2, 6.0.3.7, 5.2.4.6, 5.2.6 suffers from a possible denial of service vulnerability in the Token Authentication logic in Action Controller due to a too permissive regular expression. Impacted code uses `authenticate_or_request_with_http_token` or `authenticate_with_http_token` for request authentication.
Affected products
- Ruby on Rails: before 5.2.4.6; from 5.2.5 before 5.2.6; from 6.0.0 before 6.0.3.7; from 6.1.0 before 6.1.3.2 — fixed in 5.2.4.6, 5.2.6, 6.0.3.7, 6.1.3.2
- Rubygems Actionpack: from 6.0.0 before 6.0.3.7; from 6.1.0 before 6.1.3.2; from 5.2.5 before 5.2.6; from 4.0.0 before 5.2.4.6; 6.0.0, 6.0.1, 6.0.1.rc1, 6.0.2, 6.0.2.1, 6.0.2.2 (+188) — fixed in 6.0.3.7, 6.1.3.2, 5.2.6, 5.2.4.6
How to fix
Upgrade to a fixed version: Ruby on Rails 5.2.4.6, 5.2.6, 6.0.3.7, 6.1.3.2; Rubygems Actionpack 6.0.3.7, 6.1.3.2, 5.2.6, 5.2.4.6. Check the vendor advisory for mitigations.
References
- https://discuss.rubyonrails.org/t/cve-2021-22904-possible-dos-vulnerability-in-action-controller-token-authentication/77869
- https://hackerone.com/reports/1101125
- https://security.netapp.com/advisory/ntap-20210805-0009/
- https://discuss.rubyonrails.org/t/cve-2021-22904-possible-dos-vulnerability-in-action-controller-token-authentication/77869
- https://hackerone.com/reports/1101125
- https://security.netapp.com/advisory/ntap-20210805-0009/
Get alerted when CVE-2021-22904 or the next vulnerability affects your stack