CVE-2021-22904
HIGH 7.5CVSS 3.1Possible DoS Vulnerability in Action Controller Token Authentication
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.
- Published
- 11 Jun 2021
- Last modified
- 17 Jun 2026
- Assigned by
- support@hackerone.com
- NVD status
- Modified
- Weakness
- CWE-400
- Also known as
- GHSA-7wjx-3g7j-8584
- Sources
- NVDJSONOSV GHSA-7wjx-3g7j-8584JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | rubyonrails | railscpe:2.3:a:rubyonrails:rails:*:*:*:*:*:*:*:* |
< 5.2.4.6 | 5.2.4.6 |
| NVD | rubyonrails | railscpe:2.3:a:rubyonrails:rails:*:*:*:*:*:*:*:* |
>= 5.2.5, < 5.2.6 | 5.2.6 |
| NVD | rubyonrails | railscpe:2.3:a:rubyonrails:rails:*:*:*:*:*:*:*:* |
>= 6.0.0, < 6.0.3.7 | 6.0.3.7 |
| NVD | rubyonrails | railscpe:2.3:a:rubyonrails:rails:*:*:*:*:*:*:*:* |
>= 6.1.0, < 6.1.3.2 | 6.1.3.2 |
| OSV | RubyGems | actionpack | >= 6.0.0, < 6.0.3.7 | 6.0.3.7 |
| OSV | RubyGems | actionpack | >= 6.1.0, < 6.1.3.2 | 6.1.3.2 |
| OSV | RubyGems | actionpack | >= 5.2.5, < 5.2.6 | 5.2.6 |
| OSV | RubyGems | actionpack | >= 4.0.0, < 5.2.4.6 | 5.2.4.6 |
References
- https://discuss.rubyonrails.org/t/cve-2021-22904-possible-dos-vulnerability-in-action-controller-token-authentication/77869 · Exploit, Mitigation, Patch, Vendor Advisory, WEB
- https://hackerone.com/reports/1101125 · Permissions Required, Third Party Advisory, WEB
- https://security.netapp.com/advisory/ntap-20210805-0009/ · Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-22904 · ADVISORY
- https://github.com/rails/rails · PACKAGE
- https://github.com/rails/rails/releases/tag/v5.2.4.6 · WEB
- https://github.com/rails/rails/releases/tag/v5.2.6 · WEB
- https://github.com/rails/rails/releases/tag/v6.0.3.7 · WEB
- https://github.com/rails/rails/releases/tag/v6.1.3.2 · WEB
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2021-22904.yml · WEB
- https://groups.google.com/g/rubyonrails-security/c/Pf1TjkOBdyQ · WEB
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 11 Jun 2021)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 5 May 2021)