CVE-2021-22881
MEDIUM 6.1CVSS 3.1Actionpack Open Redirect Vulnerability
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.
- Published
- 11 Feb 2021
- Last modified
- 17 Jun 2026
- Assigned by
- support@hackerone.com
- NVD status
- Modified
- Weakness
- CWE-601
- Also known as
- GHSA-8877-prq4-9xfw
- Sources
- NVDJSONOSV GHSA-8877-prq4-9xfwJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.8 | AV:N/AC:M/Au:N/C:P/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | rubyonrails | railscpe:2.3:a:rubyonrails:rails:*:*:*:*:*:*:*:* |
>= 6.0.0, < 6.0.3.5 | 6.0.3.5 |
| NVD | rubyonrails | railscpe:2.3:a:rubyonrails:rails:*:*:*:*:*:*:*:* |
>= 6.1.0, < 6.1.2.1 | 6.1.2.1 |
| NVD | fedoraproject | fedoracpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:* |
= 33 | |
| OSV | RubyGems | actionpack | >= 6.0.0, < 6.0.3.5 | 6.0.3.5 |
| OSV | RubyGems | actionpack | >= 6.1.0, < 6.1.2.1 | 6.1.2.1 |
References
- http://www.openwall.com/lists/oss-security/2021/05/05/2 · Mailing List, Mitigation, Third Party Advisory, WEB
- http://www.openwall.com/lists/oss-security/2021/08/20/1 · Mailing List, Mitigation, Third Party Advisory, WEB
- http://www.openwall.com/lists/oss-security/2021/12/14/5 · Exploit, Mailing List, Patch, WEB
- https://benjamin-bouchet.com/cve-2021-22881-faille-de-securite-dans-le-middleware-hostauthorization/ · Patch, Third Party Advisory, WEB
- https://discuss.rubyonrails.org/t/cve-2021-22881-possible-open-redirect-in-host-authorization-middleware/77130 · Mitigation, Patch, Vendor Advisory, WEB
- https://hackerone.com/reports/1047447 · Exploit, Patch, Third Party Advisory, WEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XQ3NS4IBYE2I3MVMGAHFZBZBIZGHXHT3/
- https://nvd.nist.gov/vuln/detail/CVE-2021-22881 · ADVISORY
- https://github.com/rails/rails/commit/b5de7b3a4787d8a55aaad39f477c16e3af65e444 · WEB
- https://github.com/rails/rails · WEB
- https://github.com/rails/rails/blob/v6.1.2.1/actionpack/CHANGELOG.md · WEB
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2021-22881.yml · WEB
- https://groups.google.com/g/rubyonrails-security/c/zN_3qA26l6E · WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XQ3NS4IBYE2I3MVMGAHFZBZBIZGHXHT3 · WEB
- https://rubygems.org/gems/actionpack · WEB
History
- 25 Nov 2026 20:32 UTC · NVD: first stored (published 11 Feb 2021)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 2 Mar 2021)