CVE-2021-22904
Ruby vulnerability analysis and mitigation

Overview

The actionpack ruby gem before versions 6.1.3.2, 6.0.3.7, 5.2.4.6, and 5.2.6 contains a denial of service vulnerability (CVE-2021-22904) in the Token Authentication logic in Action Controller. The vulnerability is caused by a too permissive regular expression in the authentication mechanism. The issue affects code that uses authenticate_or_request_with_http_token or authenticate_with_http_token for request authentication (Ruby Rails Discussion).

Technical details

The vulnerability has been assigned a CVSS v3.1 base score of 7.5 (High), with the vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. This indicates that the vulnerability can be exploited remotely with low attack complexity, requires no privileges or user interaction, and can result in high impact on system availability (NVD).

Impact

Successful exploitation of this vulnerability could lead to a Denial of Service (DoS) condition in applications using the affected token authentication functionality. The vulnerability affects the availability of the system while maintaining no impact on confidentiality or integrity (Ubuntu Security).

Mitigation and workarounds

A temporary workaround can be implemented by placing the following monkey patch in an initializer: module ActionController::HttpAuthentication::Token AUTHN_PAIR_DELIMITERS = /(?:,|;|\t)/ end. For a permanent fix, users should upgrade to the fixed versions: 6.1.3.2, 6.0.3.7, 5.2.4.6, or 5.2.6 (Ruby Rails Discussion).

Additional resources


SourceThis report was generated using AI

Related Ruby vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-4249-gjr8-jpq3HIGH8.7
  • RubyRuby
  • prosemirror_to_html
NoYesNov 13, 2025
CVE-2025-64501HIGH7.6
  • RubyRuby
  • prosemirror_to_html
NoYesNov 10, 2025
GHSA-vfpf-xmwh-8m65HIGH7.6
  • RubyRuby
  • prosemirror_to_html
NoYesNov 07, 2025
GHSA-52c5-vh7f-26fxHIGH7.6
  • RubyRuby
  • prosemirror_to_html
NoYesNov 06, 2025
CVE-2025-12790HIGH7.4
  • RubyRuby
  • mqtt
NoYesNov 06, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management