# CVE-2021-22904

- Priority: **Prioritise**
- Reason: Public exploit (reference, Date unknown)
- Next step: Check applicability: affected before 5.2.4.6, 5.2.6, 6.0.3.7, 6.1.3.2 (CNA); fix release not confirmed
- Status: published
- Published: 2021-06-11 · Modified: 2024-08-03
- Aliases: UBUNTU-CVE-2021-22904, DEBIAN-CVE-2021-22904, GHSA-7wjx-3g7j-8584
- Record: https://cvemate.com/vulnerability/CVE-2021-22904 · JSON: https://cvemate.com/vulnerability/CVE-2021-22904/json

## Description

```text
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.
```

## Signals

- CVSS: 7.5 high (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- EPSS: 4.868%, percentile 92.285%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (reference)

## Affected

- debian rails (Debian): \< 2:6.0.3.7+dfsg-1
- ubuntu rails (Ubuntu): All versions (No fix recorded)
- RubyGems actionpack (RubyGems): ≥ 6.0.0, \< 6.0.3.7 \| ≥ 6.1.0, \< 6.1.3.2 \| ≥ 5.2.5, \< 5.2.6 \| ≥ 4.0.0, \< 5.2.4.6
- rubyonrails rails: \< 5.2.4.6 \| ≥ 5.2.5, \< 5.2.6 \| ≥ 6.0.0, \< 6.0.3.7 \| ≥ 6.1.0, \< 6.1.3.2

## References

- <https://hackerone.com/reports/1101125>
- <https://discuss.rubyonrails.org/t/cve-2021-22904-possible-dos-vulnerability-in-action-controller-token-authentication/77869>
- <https://security.netapp.com/advisory/ntap-20210805-0009/>
- <https://ubuntu.com/security/CVE-2021-22904>
- <https://github.com/rails/rails/commit/eab8c20f3ef6a022c4c11b439b1b22cef1768d5e>
- <https://github.com/rails/rails/commit/d861fa8ade353390c4419b53a6c6b41f3005b1f2>
- <https://github.com/rails/rails/commit/3d9e9fdf14e044b3ba66f909582c228a9d4ffb5c>
- <https://www.cve.org/CVERecord?id=CVE-2021-22904>
- <https://security-tracker.debian.org/tracker/CVE-2021-22904>
- <https://nvd.nist.gov/vuln/detail/CVE-2021-22904>
- <https://github.com/rails/rails>
- <https://github.com/rails/rails/releases/tag/v5.2.4.6>
- <https://github.com/rails/rails/releases/tag/v5.2.6>
- <https://github.com/rails/rails/releases/tag/v6.0.3.7>
- <https://github.com/rails/rails/releases/tag/v6.1.3.2>
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2021-22904.yml>
- <https://groups.google.com/g/rubyonrails-security/c/Pf1TjkOBdyQ>
- <https://security.netapp.com/advisory/ntap-20210805-0009>

---

Data as of 2026-12-05T11:24:08.512Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
