Live threats

All CVEs / Rubyonrails

CVE-2021-22904Rubyonrails Rails

High 7.5 No auth needed

Priority
60
CVSS 3.1
7.5
EPSS
4.9%
probability of exploitation in 30 days · percentile 93
Auth required
No
Published
Jun 11, 2021
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-400
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Rails.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
RubyGems actionpack ≥ 6.0.0 < 6.0.3.7 6.0.3.7 gem "actionpack", ">= 6.0.3.7"
RubyGems actionpack ≥ 6.1.0 < 6.1.3.2 6.1.3.2 gem "actionpack", ">= 6.1.3.2"
RubyGems actionpack ≥ 5.2.5 < 5.2.6 5.2.6 gem "actionpack", ">= 5.2.6"
RubyGems actionpack ≥ 4.0.0 < 5.2.4.6 5.2.4.6 gem "actionpack", ">= 5.2.4.6"

Per OSV / GitHub Advisories (GHSA-7wjx-3g7j-8584). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
rubyonrailsrails< 5.2.4.6
rubyonrailsrails≥ 5.2.5 < 5.2.6
rubyonrailsrails≥ 6.0.0 < 6.0.3.7
rubyonrailsrails≥ 6.1.0 < 6.1.3.2

Official sources

References

Links published by the sources. Open them with care.