CVE-2021-22881
MediumActionpack Open Redirect Vulnerability
Published Mar 2, 2021 · Updated Sep 9, 2026 · Also known as DEBIAN-CVE-2021-22881, GHSA-8877-prq4-9xfw, UBUNTU-CVE-2021-22881
Key Facts
Patch immediately- CVE-2021-22881 is a medium-severity vulnerability (CVSS 6.1 v3.1) affecting Rails (Rubyonrails), Fedora (Fedoraproject), actionpack (rubygems) and 4 more products.
- It is not listed in any known-exploited vulnerabilities catalog. No public exploit code is known.
- EPSS estimates a 87% probability of exploitation in the next 30 days.
- Fixed versions are available, including actionpack 6.0.3.5, actionpack 6.1.2.1, Rails 2:6.0.3.5+dfsg-1.
- Brandefense priority: patch immediately, because it is very likely to be exploited soon.
CVSS v3.1
6.1
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS (30-day exploit likelihood)
87%
Higher than 99.7% of all scored CVEs
Exploited in the wild
No known
Not in a known-exploited catalog
Public exploit code
None known
Get the full CVE-2021-22881 brief as a PDF
Every affected product and fixed release, exploitation status and a first 24 hours response checklist, emailed within minutes.
Description
The Host Authorization middleware in Action Pack before 6.1.2.1, 6.0.3.5 suffers from an open redirect vulnerability. Specially crafted Host headers in combination with certain "allowed host" formats can cause the Host Authorization middleware in Action Pack to redirect users to a malicious website. Impacted applications will have allowed hosts with a leading dot. When an allowed host contains a leading dot, a specially crafted Host header can be used to redirect to a malicious website.
Affected Products
25 affected entries in total| Product | Affected versions | Fixed in |
|---|---|---|
| RailsRubyonrails | See advisory | 6.0.3.5 |
| FedoraFedoraproject | 33 | n/a |
| actionpackrubygems | >= 6.0.0 | 6.1.2.1 |
| ruby2.7-rubygem-actionpack-6.0suse | See advisory | 6.0.4-1.2 |
| ruby3.0-rubygem-actionpack-6.0suse | See advisory | 6.0.4-1.2 |
Patched Releases
actionpack
6.0.3.5, 6.1.2.1
Rails
2:6.0.3.5+dfsg-1, 6.0.3.5
ruby2.7-rubygem-actionpack-6.0
6.0.4-1.2
ruby3.0-rubygem-actionpack-6.0
6.0.4-1.2
ruby3.1-rubygem-actionpack-6.0
6.0.4.4-1.1
Timeline
Publicly disclosed
Mar 2, 2021
Last updated
Sep 9, 2026
Weakness Type
- CWE-601 URL Redirection to Untrusted Site ('Open Redirect')
References
- advisoryGHSA advisory
- advisoryhttps://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XQ3NS4IBYE2I3MVMGAHFZBZBIZGHXHT3/
- advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2021-22881
- advisoryhttps://security-tracker.debian.org/tracker/CVE-2021-22881
- advisoryhttps://ubuntu.com/security/CVE-2021-22881
FAQ
Common Questions.
The Host Authorization middleware in Action Pack before 6.1.2.1, 6.0.3.5 suffers from an open redirect vulnerability.
Affected: Rails (Rubyonrails); Fedora (Fedoraproject) versions 33; actionpack (rubygems) versions >= 6.0.0, among others. The full list is in the CVE brief.
It is not listed in any known-exploited vulnerabilities catalog.
No, it is not currently listed in the CISA Known Exploited Vulnerabilities catalog.
No public exploit code is known.
Fixed versions are available, including actionpack 6.0.3.5, actionpack 6.1.2.1, Rails 2:6.0.3.5+dfsg-1.
Brandefense priority: patch immediately, because it is very likely to be exploited soon.
Is CVE-2021-22881 Running On Your Attack Surface?
Brandefense maps vulnerabilities like this one to your internet-facing assets and tells you exactly where to patch.
Request A Demo