CVE-2021-22881The Host Authorization middleware in Action Pack before 6.1.2.1, 6.0.3.5 suffers from an open redirect vulnerability. Specially crafted…
- 6.1MediumCVSS base score
- 87.3%Exploitation in 30 daysEPSS · top 0.2% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- 1Public exploitsMetasploit, Nuclei and Exploit-DB
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.
Public exploit
An exploit or proof of concept is public: anyone can try it against an unpatched system. The public collections list a Nuclei template for it.
Show the exploits1
Nuclei templates1 template
- Ruby on Rails - Open Redirect via Host Header Injection (Nuclei template) (opens in a new tab)
http/cves/2021/CVE-2021-22881.yamlSeverity medium
Modules, templates and exploits as listed by the Metasploit Framework (BSD-3-Clause), ProjectDiscovery's Nuclei templates (MIT) and the Exploit Database (GPLv2), read once a day. Where the data comes from
Timeline
ID reserved
By hackerone
- 36 days later
· 36 days later
Published
- 3 years later
· 3 years later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| NVDNVD · Modified | 3.1 | Medium6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
- EPSS (exploitation in 30 days)
- 87.3% · top 0.2% of all CVEs (20 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 6.1.
Affected products
https://github.com/rails/rails
- affected Fixed in 6.1.2.1, 6.0.3.5
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- RubyGemsactionpackGHSA-8877-prq4-9xfw (opens in a new tab)
References
References7
- https://hackerone.com/reports/1047447 (opens in a new tab)x_refsource_MISCx_transferred
- https://discuss.rubyonrails.org/t/cve-2021-22881-possible-open-redirect-in-host-authorization-middleware/77130 (opens in a new tab)x_refsource_MISCx_transferred
- https://benjamin-bouchet.com/cve-2021-22881-faille-de-securite-dans-le-middleware-hostauthorization/ (opens in a new tab)x_refsource_MISCx_transferred
- FEDORA-2021-b571fca1b8 (opens in a new tab)vendor-advisoryx_refsource_FEDORAx_transferred
- [oss-security] 20210505 [CVE-2021-22903] Possible Open Redirect Vulnerability in Action Pack (opens in a new tab)mailing-listx_refsource_MLISTx_transferred
- [oss-security] 20210819 [CVE-2021-22942] Possible Open Redirect in Host Authorization Middleware (opens in a new tab)mailing-listx_refsource_MLISTx_transferred
- [oss-security] 20211214 [CVE-2021-44528] Possible Open Redirect in Host Authorization Middleware (opens in a new tab)mailing-listx_refsource_MLISTx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2021-0631 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-8877-prq4-9xfw (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2021-22881)Record last updated .