CVE-2021-22881
CVE-2021-22881 is a medium-severity vulnerability in Rubyonrails Rails with a CVSS 3.x base score of 6.1. Its EPSS exploit-prediction score of 87% places it in the 100th percentile, indicating an elevated likelihood of exploitation. The underlying weakness is classified as CWE-601.
Key facts
- Severity: Medium (CVSS 3.x base score 6.1)
- CVSS v2: 5.8
- EPSS exploit prediction: 87% (100th percentile)
- Actively exploited: Not listed in CISA KEV
- Weakness: CWE-601
- Affected product: Rubyonrails Rails
- Published:
- Last modified:
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.
Frequently asked questions
- What is CVE-2021-22881?
- 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.
- How severe is CVE-2021-22881?
- CVE-2021-22881 has a CVSS 3.x base score of 6.1, rated medium severity. It is exploitable over network with low attack complexity, requires no privileges and user interaction. Impact on confidentiality is low, integrity low, and availability none.
- Is CVE-2021-22881 being actively exploited?
- It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 87% (100th percentile), an estimate of the probability of exploitation in the next 30 days.
- What products are affected by CVE-2021-22881?
- CVE-2021-22881 primarily affects Rubyonrails Rails. In total, 2 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
- How do I fix CVE-2021-22881?
- Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround.
- When was CVE-2021-22881 published?
- CVE-2021-22881 was published on 2021-02-11 and last updated on 2026-06-17.
References
- 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://benjamin-bouchet.com/cve-2021-22881-faille-de-securite-dans-le-middleware-hostauthorization/
- https://discuss.rubyonrails.org/t/cve-2021-22881-possible-open-redirect-in-host-authorization-middleware/77130
- https://hackerone.com/reports/1047447
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XQ3NS4IBYE2I3MVMGAHFZBZBIZGHXHT3/
Affected products (2)
- cpe:2.3:a:rubyonrails:rails:*:*:*:*:*:*:*:*
- cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*
More vulnerabilities in Rubyonrails Rails
- CVE-2013-0277 — Critical (CVSS 10.0): ActiveRecord in Ruby on Rails before 2.3.17 and 3.x before 3.1.0 allows remote attackers to cause a denial of service…
- CVE-2026-33195 — Critical (CVSS 9.8): Active Storage allows users to attach cloud and local files in Rails applications. Prior to versions 8.1.2.1, 8.0.4.1,…
- CVE-2020-8165 — Critical (CVSS 9.8): A deserialization of untrusted data vulnernerability exists in rails < 5.2.4.3, rails < 6.0.3.1 that can allow an…
- CVE-2019-5420 — Critical (CVSS 9.8): A remote code execution vulnerability in development mode Rails <5.2.2.1, <6.0.0.beta3 can allow an attacker to guess…
- CVE-2026-33202 — Critical (CVSS 9.1): Active Storage allows users to attach cloud and local files in Rails applications. Prior to versions 8.1.2.1, 8.0.4.1,…
- CVE-2020-8163 — High (CVSS 8.8): The is a code injection vulnerability in versions of Rails prior to 5.0.1 that wouldallow an attacker who controlled…
All CVEs affecting Rubyonrails Rails →
Other CWE-601 (Open Redirect) vulnerabilities
- CVE-2018-3774 — Critical (CVSS 10.0): Incorrect parsing in url-parse <1.4.3 returns wrong hostname which leads to multiple vulnerabilities such as SSRF, Open…
- CVE-2019-25282 — Critical (CVSS 9.8): V-SOL GPON/EPON OLT Platform v2.03 contains an open redirect vulnerability in the script that allows attackers to…
- CVE-2020-36912 — Critical (CVSS 9.8): Plexus anblick Digital Signage Management 3.1.13 contains an open redirect vulnerability in the 'PantallaLogin' script…
- CVE-2025-43526 — Critical (CVSS 9.8): This issue was addressed with improved URL validation. This issue is fixed in Safari 26.2, macOS Tahoe 26.2. On a Mac…
- CVE-2025-55031 — Critical (CVSS 9.8): Malicious pages could use Firefox for iOS to pass FIDO: links to the OS and trigger the hybrid passkey transport. An…
- CVE-2024-22891 — Critical (CVSS 9.8): Nteract v.0.28.0 was discovered to contain a remote code execution (RCE) vulnerability via the Markdown link.