CVE-2021-22881 json
Actionpack Open Redirect Vulnerability
published 2021-02-11 5 y ago modified 2026-06-17 4 mo ago also GHSA-8877-prq4-9xfw , EUVD-2021-0631
- cvss
- 6.1
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 87.3%
- EPSS 87.3% chance of exploitation in 30 days, percentile 99.7%
- public exploits
- 0
- none known, plus a Nuclei check
Summary
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.
Patch / fix
- rubygems actionpack 6.0.3.5, 6.1.2.1
- rubyonrails rails 6.0.3.5, 6.1.2.1
- rails Debian 14, Debian 13, Debian 12 2:6.0.3.5+dfsg-1
debian advisories DEBIAN-CVE-2021-22881
- rubygem-actionpack-6.0 openSUSE Tumbleweed 6.0.4.4-1.1
opensuse advisories openSUSE-SU-2024:11821-1
- github.com/rails/rails@b5de7b3 commit
- openwall.com/lists/oss-security/2021/12/14/5 patch
- hackerone.com/reports/1047447 advisory
- discuss.rubyonrails.org/t/cve-2021-22881-possible-open-redirect-in-host-authorizat… advisory
- benjamin-bouchet.com/cve-2021-22881-faille-de-securite-dans-le-middleware-hosta… advisory
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-22881 updated cvss 6.1
rubygem-actionpack: open redirect vulnerability may lead to confidentiality and integrity compromise
-
Red Hat CloudForms Management Engine 5 cfme-gemsetaffected: no fix planned “Will not fix”
-
Red Hat Satellite 6 tfm-rubygem-actionpack, tfm-ror52-rubygem-actionpacknot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
87.30% chance of exploitation in the next 30 days, higher than 99.7% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- Nuclei template Ruby on Rails - Open Redirect via Host Header Injection nuclei detection template
- hackerone.com https://hackerone.com/reports/1047447 referenced PoC, tagged "exploit" by a source, unverified
- openwall.com http://www.openwall.com/lists/oss-security/2021/12/14/5 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 2.0 | 5.8 | AV:N/AC:M/Au:N/C:P/I:P/A:N |
| GitHub | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| rubygems | actionpack | >=6.0.0, <6.0.3.5 >=6.1.0, <6.1.2.1 |
6.0.3.5 6.1.2.1 |
Affected products
- n/a https://github.com/rails/rails
Classification
- Weakness
-
- CWE-601 URL Redirection to Untrusted Site
- Technology feeds
References
-
hackerone.com
/reports/1047447
web, exploit, patch, third-party-advisory
-
discuss.rubyonrails.org
/t/cve-2021-22881-possible-open-redirect-in-host-authorization-middleware/77130
web, mitigation, patch, vendor-advisory
-
benjamin-bouchet.com
/cve-2021-22881-faille-de-securite-dans-le-middleware-hostauthorization/
patch, third-party-advisory
-
openwall.com
/lists/oss-security/2021/12/14/5
mailing-list, web, exploit, patch
-
github.com
/rails/rails/commit/b5de7b3a4787d8a55aaad39f477c16e3af65e444
web
-
lists.fedoraproject.org
/archives/list/package-announce%40lists.fedoraproject.org/message/XQ3NS4IBYE2I3MVMGAHFZBZBIZGHXHT3/
vendor-advisory
-
openwall.com
/lists/oss-security/2021/05/05/2
mailing-list, web, mitigation, third-party-advisory
-
openwall.com
/lists/oss-security/2021/08/20/1
mailing-list, web, mitigation, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-22881
advisory
-
benjamin-bouchet.com
/cve-2021-22881-faille-de-securite-dans-le-middleware-hostauthorization
web
-
github.com
/rails/rails
web
-
github.com
/rails/rails/blob/v6.1.2.1/actionpack/CHANGELOG.md
web
-
github.com
/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2021-22881.yml
web
-
groups.google.com
/g/rubyonrails-security/c/zN_3qA26l6E
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/XQ3NS4IBYE2I3MVMGAHFZBZBIZGHXHT3
web
-
rubygems.org
/gems/actionpack
web
Sources
- CVE List CVE-2021-22881
- GitHub Advisory GHSA-8877-prq4-9xfw
- NVD CVE-2021-22881
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.