Every CVE Search/ Get API key

CVE-2021-22902

Denial of Service in Action Dispatch

7.5 HighFix available

The actionpack ruby gem (a framework for handling and responding to web requests in Rails) before 6.0.3.7, 6.1.3.2 suffers from a possible denial of service vulnerability in the Mime type parser of Action Dispatch. Carefully crafted Accept headers can cause the mime type parser in Action Dispatch to do catastrophic backtracking in the regular expression engine.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

2.87%Up 2.0 points since Jun 12, 2021
90%50%10%1%

What each source reports

NVD Score used 7.5

The actionpack ruby gem (a framework for handling and responding to web requests in Rails) before 6.0.3.7, 6.1.3.2 suffers from a possible denial of service vulnerability in the Mime type parser of Action Dispatch. Carefully crafted Accept headers can cause the mime type parser in Action Dispatch to do catastrophic backtracking in the regular expression engine.

Record
CVE-2021-22902
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 2.0
5.0 MediumAV:N/AC:L/Au:N/C:N/I:N/A:P
Weakness
CWE-400
Updated
2026-11-02
CVE List No score

The actionpack ruby gem (a framework for handling and responding to web requests in Rails) before 6.0.3.7, 6.1.3.2 suffers from a possible denial of service vulnerability in the Mime type parser of Action Dispatch. Carefully crafted Accept headers can cause the mime type parser in Action Dispatch to do catastrophic backtracking in the regular expression engine.

Record
CVE-2021-22902
Weakness
CWE-400
Updated
2026-11-02
EUVDEUVD-2021-1076 No score

The actionpack ruby gem (a framework for handling and responding to web requests in Rails) before 6.0.3.7, 6.1.3.2 suffers from a possible denial of service vulnerability in the Mime type parser of Action Dispatch. Carefully crafted Accept headers can cause the mime type parser in Action Dispatch to do catastrophic backtracking in the regular expression engine.

Record
EUVD-2021-1076
Updated
2026-11-03
GitHub AdvisoriesGHSA-g8ww-46x2-2p65 7.5

Denial of Service in Action Dispatch

Impact

There is a possible Denial of Service vulnerability in Action Dispatch. Carefully crafted Accept headers can cause the mime type parser in Action Dispatch to do catastrophic backtracking in the regular expression engine.

Releases

The fixed releases are available at the normal locations.

Workarounds

The following monkey patch placed in an initializer can be used to work around the issue.

module Mime
  class Type
    MIME_REGEXP = /\A(?:\*\/\*|#{MIME_NAME}\/(?:\*|#{MIME_NAME})(?>\s*#{MIME_PARAMETER}\s*)*)\z/
  end
end

Patches

To aid users who aren't able to upgrade immediately we have provided patches for the two supported release series. They are in git-am format and consist of a single changeset.

  • 6-0-Prevent-catastrophic-backtracking-during-mime-parsin.patch - Patch for 6.0 series
  • 6-1-Prevent-catastrophic-backtracking-during-mime-parsin.patch - Patch for 6.1 series

Please note that only the 6.1.Z, 6.0.Z, and 5.2.Z series are supported at present. Users of earlier unsupported releases are advised to upgrade as soon as possible as we cannot guarantee the continued availability of security fixes for unsupported releases.

Credits

Thanks to Security Curious [email protected] for reporting this!

Record
GHSA-g8ww-46x2-2p65
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-400
Updated
2026-11-02
OSV 7.5

The actionpack ruby gem (a framework for handling and responding to web requests in Rails) before 6.0.3.7, 6.1.3.2 suffers from a possible denial of service vulnerability in the Mime type parser of Action Dispatch. Carefully crafted Accept headers can cause the mime type parser in Action Dispatch to do catastrophic backtracking in the regular expression engine.

Record
CVE-2021-22902
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2021-22902 7.5

The actionpack ruby gem (a framework for handling and responding to web requests in Rails) before 6.0.3.7, 6.1.3.2 suffers from a possible denial of service vulnerability in the Mime type parser of Action Dispatch. Carefully crafted Accept headers can cause the mime type parser in Action Dispatch to do catastrophic backtracking in the regular expression engine.

Record
DEBIAN-CVE-2021-22902
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
Show 5 moreShow less
OSVGHSA-g8ww-46x2-2p65 7.5

Denial of Service in Action Dispatch

Impact

There is a possible Denial of Service vulnerability in Action Dispatch. Carefully crafted Accept headers can cause the mime type parser in Action Dispatch to do catastrophic backtracking in the regular expression engine.

Releases

The fixed releases are available at the normal locations.

Workarounds

The following monkey patch placed in an initializer can be used to work around the issue.

module Mime
  class Type
    MIME_REGEXP = /\A(?:\*\/\*|#{MIME_NAME}\/(?:\*|#{MIME_NAME})(?>\s*#{MIME_PARAMETER}\s*)*)\z/
  end
end

Patches

To aid users who aren't able to upgrade immediately we have provided patches for the two supported release series. They are in git-am format and consist of a single changeset.

  • 6-0-Prevent-catastrophic-backtracking-during-mime-parsin.patch - Patch for 6.0 series
  • 6-1-Prevent-catastrophic-backtracking-during-mime-parsin.patch - Patch for 6.1 series

Please note that only the 6.1.Z, 6.0.Z, and 5.2.Z series are supported at present. Users of earlier unsupported releases are advised to upgrade as soon as possible as we cannot guarantee the continued availability of security fixes for unsupported releases.

Credits

Thanks to Security Curious [email protected] for reporting this!

Record
GHSA-g8ww-46x2-2p65
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-400
Updated
2026-11-02
OSVRHSA-2021:4702 9.8

Red Hat Security Advisory: Satellite 6.10 Release

Record
RHSA-2021:4702
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVUBUNTU-CVE-2021-22902 7.5

The actionpack ruby gem (a framework for handling and responding to web requests in Rails) before 6.0.3.7, 6.1.3.2 suffers from a possible denial of service vulnerability in the Mime type parser of Action Dispatch. Carefully crafted Accept headers can cause the mime type parser in Action Dispatch to do catastrophic backtracking in the regular expression engine.

Record
UBUNTU-CVE-2021-22902
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVopenSUSE-SU-2024:11318-1 No score

ruby2.7-rubygem-actionpack-6.0-6.0.4-1.2 on GA media

These are all security issues fixed in the ruby2.7-rubygem-actionpack-6.0-6.0.4-1.2 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:11318-1
Updated
2026-11-02
OSVopenSUSE-SU-2024:11821-1 No score

ruby3.1-rubygem-actionpack-6.0-6.0.4.4-1.1 on GA media

These are all security issues fixed in the ruby3.1-rubygem-actionpack-6.0-6.0.4.4-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:11821-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
actionpack
RubyGems
6.0.0 to 6.0.3.6
6.0.3.7
actionpack
RubyGems
6.1.0 to 6.1.3.1
6.1.3.2
rails
Debian:12
before 2:6.0.3.7+dfsg-1
2:6.0.3.7+dfsg-1
rails
Debian:13
before 2:6.0.3.7+dfsg-1
2:6.0.3.7+dfsg-1
rails
Debian:14
before 2:6.0.3.7+dfsg-1
2:6.0.3.7+dfsg-1
actionpack
RubyGems
6.0.0 up to 6.0.3.7, plus listed versions
6.0.16.0.1.rc16.0.26.0.2.16.0.2.2
Show 10 moreShow less
6.0.2.rc16.0.2.rc26.0.36.0.3.16.0.3.26.0.3.36.0.3.46.0.3.56.0.3.66.0.3.rc1
6.0.3.7
actionpack
RubyGems
6.1.0 up to 6.1.3.2, plus listed versions
6.1.16.1.26.1.2.16.1.36.1.3.1
6.1.3.2
python-ecdsa
Red Hat:satellite_capsule:6.10::el7
From an advisory covering 21 CVEs
before 0:0.13.3-2.el7pc
0:0.13.3-2.el7pc
python3-ecdsa
Red Hat:satellite_capsule:6.10::el7
From an advisory covering 21 CVEs
before 0:0.13.3-2.el7pc
0:0.13.3-2.el7pc
python-ecdsa
Red Hat:satellite:6.10::el7
From an advisory covering 21 CVEs
before 0:0.13.3-2.el7pc
0:0.13.3-2.el7pc
Show 35 moreShow less
Affected packages
PackageAffectedFixed
python3-ecdsa
Red Hat:satellite:6.10::el7
From an advisory covering 21 CVEs
before 0:0.13.3-2.el7pc
0:0.13.3-2.el7pc
tfm-rubygem-activerecord-session_store
Red Hat:satellite:6.10::el7
From an advisory covering 21 CVEs
before 0:2.0.0-1.el7sat
0:2.0.0-1.el7sat
satellite
Red Hat:satellite_capsule:6.10::el7
From an advisory covering 21 CVEs
before 0:6.10.0-3.el7sat
0:6.10.0-3.el7sat
satellite
Red Hat:satellite:6.10::el7
From an advisory covering 21 CVEs
before 0:6.10.0-3.el7sat
0:6.10.0-3.el7sat
candlepin
Red Hat:satellite:6.10::el7
From an advisory covering 21 CVEs
before 0:4.0.9-1.el7sat
0:4.0.9-1.el7sat
python-pyyaml
Red Hat:satellite_capsule:6.10::el7
From an advisory covering 21 CVEs
before 0:5.4.1-1.el7pc
0:5.4.1-1.el7pc
python3-pyyaml
Red Hat:satellite_capsule:6.10::el7
From an advisory covering 21 CVEs
before 0:5.4.1-1.el7pc
0:5.4.1-1.el7pc
python-pyyaml
Red Hat:satellite:6.10::el7
From an advisory covering 21 CVEs
before 0:5.4.1-1.el7pc
0:5.4.1-1.el7pc
python3-pyyaml
Red Hat:satellite:6.10::el7
From an advisory covering 21 CVEs
before 0:5.4.1-1.el7pc
0:5.4.1-1.el7pc
tfm-rubygem-nokogiri
Red Hat:satellite_capsule:6.10::el7
From an advisory covering 21 CVEs
before 0:1.11.3-2.el7sat
0:1.11.3-2.el7sat
tfm-rubygem-nokogiri
Red Hat:satellite:6.10::el7
From an advisory covering 21 CVEs
before 0:1.11.3-2.el7sat
0:1.11.3-2.el7sat
satellite-capsule
Red Hat:satellite_capsule:6.10::el7
From an advisory covering 21 CVEs
before 0:6.10.0-3.el7sat
0:6.10.0-3.el7sat
foreman
Red Hat:satellite_capsule:6.10::el7
From an advisory covering 21 CVEs
before 0:2.5.2.17-2.el7sat
0:2.5.2.17-2.el7sat
foreman
Red Hat:satellite:6.10::el7
From an advisory covering 21 CVEs
before 0:2.5.2.17-2.el7sat
0:2.5.2.17-2.el7sat
python-aiohttp
Red Hat:satellite_capsule:6.10::el7
From an advisory covering 21 CVEs
before 0:3.7.4-1.el7pc
0:3.7.4-1.el7pc
python-aiohttp
Red Hat:satellite:6.10::el7
From an advisory covering 21 CVEs
before 0:3.7.4-1.el7pc
0:3.7.4-1.el7pc
tfm-rubygem-actionpack
Red Hat:satellite:6.10::el7
From an advisory covering 21 CVEs
before 0:6.0.3.7-1.el7sat
0:6.0.3.7-1.el7sat
tfm-rubygem-rails
Red Hat:satellite:6.10::el7
From an advisory covering 21 CVEs
before 0:6.0.3.7-1.el7sat
0:6.0.3.7-1.el7sat
python3-django
Red Hat:satellite_capsule:6.10::el7
From an advisory covering 21 CVEs
before 0:2.2.24-1.el7pc
0:2.2.24-1.el7pc
python3-django
Red Hat:satellite:6.10::el7
From an advisory covering 21 CVEs
before 0:2.2.24-1.el7pc
0:2.2.24-1.el7pc
tfm-rubygem-puma
Red Hat:satellite:6.10::el7
From an advisory covering 21 CVEs
before 0:5.3.2-1.el7sat
0:5.3.2-1.el7sat
tfm-rubygem-addressable
Red Hat:satellite:6.10::el7
From an advisory covering 21 CVEs
before 0:2.8.0-1.el7sat
0:2.8.0-1.el7sat
python-urllib3
Red Hat:satellite_capsule:6.10::el7
From an advisory covering 21 CVEs
before 0:1.26.5-1.el7pc
0:1.26.5-1.el7pc
python3-urllib3
Red Hat:satellite_capsule:6.10::el7
From an advisory covering 21 CVEs
before 0:1.26.5-1.el7pc
0:1.26.5-1.el7pc
python-urllib3
Red Hat:satellite:6.10::el7
From an advisory covering 21 CVEs
before 0:1.26.5-1.el7pc
0:1.26.5-1.el7pc
python3-urllib3
Red Hat:satellite:6.10::el7
From an advisory covering 21 CVEs
before 0:1.26.5-1.el7pc
0:1.26.5-1.el7pc
rails
Ubuntu:Pro:16.04:LTS
All versions, plus listed versions
2:4.1.10-12:4.2.5-12:4.2.5.1-12:4.2.5.2-22:4.2.6-12:4.2.6-1ubuntu0.1~esm12:4.2.6-1ubuntu0.1~esm2
None known
rails
Ubuntu:Pro:18.04:LTS
All versions, plus listed versions
2:4.2.9-22:4.2.9-42:4.2.10-0ubuntu42:4.2.10-0ubuntu4+esm12:4.2.10-0ubuntu4+esm2
None known
rails
Ubuntu:Pro:20.04:LTS
All versions, plus listed versions
2:5.2.2.1+dfsg-1ubuntu12:5.2.3+dfsg-32:5.2.3+dfsg-3ubuntu0.1~esm1
None known
rails
Ubuntu:Pro:22.04:LTS
All versions, plus listed versions
2:6.0.3.7+dfsg-22:6.1.4.1+dfsg-8ubuntu22:6.1.4.1+dfsg-8ubuntu2+esm1
None known
rails
Ubuntu:24.04:LTS
All versions, plus listed versions
2:6.1.7.3+dfsg-2build12:6.1.7.3+dfsg-3
None known
rails
Ubuntu:25.10
All versions, plus listed versions
2:6.1.7.3+dfsg-72:7.2.2.1+dfsg-7
None known
rails
Ubuntu:26.10
All versions, plus listed versions
2:7.2.3+dfsg-22:7.2.3.2+dfsg-2
None known
rails
Ubuntu:26.04:LTS
All versions, plus listed versions
2:7.2.2.1+dfsg-72:7.2.2.2+dfsg-22:7.2.3+dfsg-2
None known
rubygem-actionpack-6.0
openSUSE:Tumbleweed
From an advisory covering 12 CVEs
before 6.0.4.4-1.1
6.0.4.4-1.1

History

History
RecordedChangedSources
affected, facts
aliases, productsEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-22902 is a high vulnerability (CVSS 7.5) in Rubyonrails Rails, published May 5, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 2.87%, the 86th percentile. Fixed in actionpack 6.0.3.7.

References

Show 194 moreShow less
This page doesn't list everything

Left out here: 411 references. The JSON record has them.

MoveEnter Open