Vulnerability · Published Jun 11, 2021 · Assigned by hackerone
CVE-2021-22904
High 7.5
In plain English
A high-severity uncontrolled resource consumption in https://github.com/rails/rails. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 4.9% (higher than 92% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | rails | 2:6.0.3.7+dfsg-1 | DEBIAN-CVE-2021-22904 |
| Debian:13 | rails | 2:6.0.3.7+dfsg-1 | DEBIAN-CVE-2021-22904 |
| Debian:14 | rails | 2:6.0.3.7+dfsg-1 | DEBIAN-CVE-2021-22904 |
| RubyGems | actionpack | 5.2.4.6 | GHSA-7wjx-3g7j-8584 |
| RubyGems | actionpack | 6.0.3.7 | GHSA-7wjx-3g7j-8584 |
| RubyGems | actionpack | 6.1.3.2 | GHSA-7wjx-3g7j-8584 |
| RubyGems | actionpack | 5.2.6 | GHSA-7wjx-3g7j-8584 |
| Ubuntu:24.04:LTS | rails | no fix listed | UBUNTU-CVE-2021-22904 |
| Ubuntu:25.10 | rails | no fix listed | UBUNTU-CVE-2021-22904 |
| Ubuntu:26.04:LTS | rails | no fix listed | UBUNTU-CVE-2021-22904 |
| Ubuntu:26.10 | rails | no fix listed | UBUNTU-CVE-2021-22904 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| n/a | https://github.com/rails/rails | Fixed in 6.1.3.2, 6.0.3.7, 5.2.4.6, 5.2.6 |
Weakness: CWE-400
References
- https://hackerone.com/reports/1101125 x_refsource_MISC
- https://discuss.rubyonrails.org/t/cve-2021-22904-possible-dos-vulnerability-in-action-controller-token-authentication/77869 x_refsource_MISC
- https://security.netapp.com/advisory/ntap-20210805-0009/ x_refsource_CONFIRM