# CVE-2021-22904: Possible DoS Vulnerability in Action Controller Token Authentication

- Severity: High 7.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 4.87%, higher than 92% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2021-05-05T19:49:12.000Z
- Modified: 2026-06-17T03:37:59.707Z
- Also known as: GHSA-7wjx-3g7j-8584
- Weaknesses: CWE-400
- Assigned by: hackerone

## 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.

(As written by CVE List.)

## Affected

- https://github.com/rails/rails: Fixed in 6.1.3.2, 6.0.3.7, 5.2.4.6, 5.2.6
- actionpack (RubyGems): 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
- rubyonrails 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

## Every score

- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:N/I:N/A:P`

## 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)
- <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)
- <https://security.netapp.com/advisory/ntap-20210805-0009> (web)

## Sources

- CVE List: [CVE-2021-22904](https://www.cve.org/CVERecord?id=CVE-2021-22904), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-7wjx-3g7j-8584](https://github.com/advisories/GHSA-7wjx-3g7j-8584), CC-BY-4.0, modified 2024-02-16
- NVD: [CVE-2021-22904](https://nvd.nist.gov/vuln/detail/CVE-2021-22904), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-22904 · Whole record: https://cve.day/CVE-2021-22904.json · Rebuilt by cve.day 2026-11-25T22:58:01.811Z
