# CVE-2021-22881

- Priority: **Routine**
- Reason: Not severe (CVSS 6.1, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2021-02-11 · Modified: 2024-08-03
- Aliases: UBUNTU-CVE-2021-22881, DEBIAN-CVE-2021-22881, GHSA-8877-prq4-9xfw
- Record: https://cvemate.com/vulnerability/CVE-2021-22881 · JSON: https://cvemate.com/vulnerability/CVE-2021-22881/json

## Description

```text
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.
```

## Signals

- CVSS: 6.1 medium (v3.1, NVD) CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- EPSS: 87.301%, percentile 99.753%, as of 2026-12-05
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 2 (reference)

## Affected

- debian rails (Debian): \< 2:6.0.3.5+dfsg-1
- ubuntu rails (Ubuntu): All versions (No fix recorded)
- fedoraproject fedora: 33
- RubyGems actionpack (RubyGems): ≥ 6.0.0, \< 6.0.3.5 \| ≥ 6.1.0, \< 6.1.2.1
- rubyonrails rails: ≥ 6.0.0, \< 6.0.3.5 \| ≥ 6.1.0, \< 6.1.2.1

## References

- <https://hackerone.com/reports/1047447>
- <https://discuss.rubyonrails.org/t/cve-2021-22881-possible-open-redirect-in-host-authorization-middleware/77130>
- <https://benjamin-bouchet.com/cve-2021-22881-faille-de-securite-dans-le-middleware-hostauthorization/>
- <https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XQ3NS4IBYE2I3MVMGAHFZBZBIZGHXHT3/>
- <http://www.openwall.com/lists/oss-security/2021/05/05/2>
- <http://www.openwall.com/lists/oss-security/2021/08/20/1>
- <http://www.openwall.com/lists/oss-security/2021/12/14/5>
- <https://ubuntu.com/security/CVE-2021-22881>
- <https://www.cve.org/CVERecord?id=CVE-2021-22881>
- <https://security-tracker.debian.org/tracker/CVE-2021-22881>
- <https://nvd.nist.gov/vuln/detail/CVE-2021-22881>
- <https://github.com/rails/rails/commit/b5de7b3a4787d8a55aaad39f477c16e3af65e444>
- <https://benjamin-bouchet.com/cve-2021-22881-faille-de-securite-dans-le-middleware-hostauthorization>
- <https://github.com/rails/rails>
- <https://github.com/rails/rails/blob/v6.1.2.1/actionpack/CHANGELOG.md>
- <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2021-22881.yml>
- <https://groups.google.com/g/rubyonrails-security/c/zN_3qA26l6E>
- <https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XQ3NS4IBYE2I3MVMGAHFZBZBIZGHXHT3>
- <https://rubygems.org/gems/actionpack>

---

Data as of 2026-12-05T14:10:31.404Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
