Uncontrolled resource consumption in https://github.com/rails/rails
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Partial Red Hat: 1 fixed, 3 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-400.
Summary
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | https://github.com/rails/rails | Fixed in 6.1.3.2, 6.0.3.7, 5.2.4.6, 5.2.6 | — | No fix listed | CNA |
| — | actionpack (RubyGems) | 6.0.0 to before 6.0.3.7 | 6.0.3.7 | Patch available | GHSA-7wjx-3g7j-8584 |
| — | actionpack (RubyGems) | 6.1.0 to before 6.1.3.2 | 6.1.3.2 | Patch available | GHSA-7wjx-3g7j-8584 |
| — | actionpack (RubyGems) | 5.2.5 to before 5.2.6 | 5.2.6 | Patch available | GHSA-7wjx-3g7j-8584 |
| — | actionpack (RubyGems) | 4.0.0 to before 5.2.4.6 | 5.2.4.6 | Patch available | GHSA-7wjx-3g7j-8584 |
- https://github.com/rails/rails Vendor— Affected Fixed in 6.1.3.2, 6.0.3.7, 5.2.4.6, 5.2.6 Fixed in — No fix listed CNA
- actionpack (RubyGems) Vendor— Affected 6.0.0 to before 6.0.3.7 Fixed in 6.0.3.7 Patch available GHSA-7wjx-3g7j-8584
- actionpack (RubyGems) Vendor— Affected 6.1.0 to before 6.1.3.2 Fixed in 6.1.3.2 Patch available GHSA-7wjx-3g7j-8584
- actionpack (RubyGems) Vendor— Affected 5.2.5 to before 5.2.6 Fixed in 5.2.6 Patch available GHSA-7wjx-3g7j-8584
- actionpack (RubyGems) Vendor— Affected 4.0.0 to before 5.2.4.6 Fixed in 5.2.4.6 Patch available GHSA-7wjx-3g7j-8584
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:rubyonrails:rails:*:*:*:*:*:*:*:* | before 5.2.4.6; 5.2.5 to before 5.2.6; 6.0.0 to before 6.0.3.7; 6.1.0 to before 6.1.3.2 | Vulnerable | Rails |
- cpe:2.3:a:rubyonrails:rails:*:*:*:*:*:*:*:* Versions before 5.2.4.6; 5.2.5 to before 5.2.6; 6.0.0 to before 6.0.3.7; 6.1.0 to before 6.1.3.2 Vulnerable ·Rails
Remediation
- Fix · GHSA-7wjx-3g7j-8584 actionpack (RubyGems) Fixed in 6.0.3.7 Advisory →
- Fix · GHSA-7wjx-3g7j-8584 actionpack (RubyGems) Fixed in 6.1.3.2 Advisory →
- Fix · GHSA-7wjx-3g7j-8584 actionpack (RubyGems) Fixed in 5.2.6 Advisory →
- Fix · GHSA-7wjx-3g7j-8584 actionpack (RubyGems) Fixed in 5.2.4.6 Advisory →
Red Hat 1 advisory
- RHSA-2021:4702 Released 2021-11-16 · Red Hat rating ModerateSatellite 6.10 Release
- Red Hat Satellite 6.10 candlepin-4.0.9-1.el7sat, foreman-2.5.2.17-2.el7sat, python-aiohttp-3.7.4-1.el7pc +14
- Red Hat Satellite Capsule 6.10 foreman-2.5.2.17-2.el7sat, python-aiohttp-3.7.4-1.el7pc, python-ecdsa-0.13.3-2.el7pc +9
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| CloudForms Management Engine 5 | Affected | No fix planned: Will not fix |
| Red Hat 3scale API Management Platform 2 | Affected | No fix yet |
| Red Hat Satellite 6 | Affected | No fix planned: Will not fix |
| Red Hat Satellite 6.10 | Fixed | RHSA-2021:4702 |
Not affected: 2 products
- Red Hat Satellite 6.10
- Red Hat Satellite Capsule 6.10
Timeline
- 2026-10-02 Threatist record created from CVE-2021-22904
- 2026-10-03 Alias added: GHSA-7wjx-3g7j-8584
References
Advisory 3
Other 8
- 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
More Rails vulnerabilities
- TI-2014-00124 Directory traversal vulnerability in actionpack/lib/abstract_controller/base.rb in the… KEVCVSS 3.1HIGH 7.5
- TI-2019-03828 Path traversal in Rails https://github.com/rails/rails KEVCVSS 3.1HIGH 7.5
- TI-2016-00672 Directory traversal vulnerability in Action View in Ruby on Rails before 3.2.22.1, 4.0.x… KEVCVSS 3.1HIGH 7.5
- TI-2019-03830 Command injection in Rails https://github.com/rails/rails CVSS 3.1CRITICAL 9.8
- TI-2020-06581 Code injection in https://github.com/rails/rails CVSS 3.1HIGH 8.8
- TI-2013-00091 active_support/core_ext/hash/conversions.rb in Ruby on Rails before 2.3.15, 3.0.x before… CVSS 2.0HIGH 7.5
Sources
- CVE-2021-22904 · CVE Program
- CVE-2021-22904 · NVD
- FIRST EPSS
- GHSA-7wjx-3g7j-8584 · GitHub Advisory Database · CC BY 4.0
- CVE-2021-22904 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences