← Vulnerability feed

Vulnerability record · CVE-2021-22881 · published 11 February 2021

CVE-2021-22881: Rails Action Pack Host Authorization middleware open redirect

Rubyonrails · Rails

The Host Authorization middleware in Action Pack before 6.1.2.1 and 6.0.3.5 mishandles specially crafted Host headers when an allowed host entry has a leading dot, allowing an open redirect to an attacker-controlled site. It matters because the redirect originates from a trusted application domain, which aids phishing and credential theft. Only applications configured with leading-dot allowed hosts are impacted.

6.1 CVSS 3.1 Medium EPSS 87% · top 0.3% CWE-601 · Open redirect
6.1CVSS 3.1 base score, v2 5.8
87%EPSS exploitation probability, 30 days
NoNot in CISA KEV
2Affected product versions listed by NVD
14References, 4 tagged exploit
17 Jun 2026Last modified by NVD

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.

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Automated analysis

Generated by VULONE's analysis model from the NVD record, CISA KEV and EPSS data on 18 September 2026. Confidence: high.

high priorityThe flaw is remotely reachable without authentication and has very high EPSS with public exploit references, though it requires user interaction and a specific leading-dot configuration.

What it is

The Host Authorization middleware in Action Pack before 6.1.2.1 and 6.0.3.5 mishandles specially crafted Host headers when an allowed host entry has a leading dot, allowing an open redirect to an attacker-controlled site. It matters because the redirect originates from a trusted application domain, which aids phishing and credential theft. Only applications configured with leading-dot allowed hosts are impacted.

Impact

An attacker can cause the application to redirect a victim to a malicious website, enabling phishing, credential harvesting or malware delivery under the cover of a trusted domain. The CVSS vector shows limited confidentiality and integrity impact with no availability impact.

Attack surface

Reachable over the network via a crafted Host header on requests to the affected middleware; no authentication is required, but the victim must follow the redirect, so user interaction is needed. Exploitation requires the application to have an allowed host entry with a leading dot.

Exploitation

Not listed in CISA KEV, but EPSS is very high (0.873 probability, 99.7th percentile) and multiple references are tagged Exploit, including a HackerOne report and an oss-security post, indicating public exploit detail exists. No ransomware usage is documented.

What to do

  • Upgrade Action Pack to 6.1.2.1 or 6.0.3.5 (or later) as the primary fix.
  • Remove leading dots from allowed host entries in the Host Authorization configuration where possible.
  • Review and tighten the allowed hosts list so only exact, intended hostnames are accepted.
  • Apply the Fedora package updates referenced in the advisory for Rails packages.
  • Where patching is delayed, add a reverse proxy or WAF rule that rejects malformed or unexpected Host headers.

Detection

  • Monitor web and proxy logs for requests with unusual or attacker-controlled Host header values, especially those matching allowed hosts with leading dots.
  • Alert on outbound redirect responses (3xx) whose Location header points to domains outside the expected allowlist.
  • Correlate spikes in redirect responses with Host header anomalies from the same source.
  • Review application configuration for allowed host entries containing leading dots as an exposure indicator.

This assessment is produced automatically and is not human-reviewed. Verify against the vendor advisory before acting on it.

Affected products

2 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

Track CVE-2021-22881 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

10.0CVE-2021-44228Apache Log4j2 JNDI lookup remote code executionApache Log4j2 versions 2.0-beta9 through 2.15.0 (excluding 2.12.2, 2.12.3, and 2.3.1) do not protect against attacker-controlled LDAP and other JNDI …KEVEPSS 100%analysed9.8CVE-2024-4577PHP-CGI on Windows argument injection leads to remote code executionPHP-CGI on Windows can misinterpret characters in the command line passed to Win32 API functions when certain code pages are configured, due to Windo…KEVEPSS 100%analysed9.8CVE-2021-44026Roundcube Webmail SQL injection via search parametersRoundcube Webmail before 1.3.17 and 1.4.x before 1.4.12 is prone to SQL injection through the search or search_params input. The flaw is remotely rea…KEVEPSS 70%analysed9.8CVE-2021-42013Apache HTTP Server path traversal and RCE via incomplete fixThe fix for CVE-2021-41773 in Apache HTTP Server 2.4.50 was insufficient, leaving a path traversal flaw that lets attackers map URLs to files outside…KEVEPSS 100%analysed9.8CVE-2021-41773Apache HTTP Server 2.4.49 path traversal and RCEA path normalization flaw introduced in Apache HTTP Server 2.4.49 lets attackers map URLs to files outside directories configured by Alias-like direc…KEVEPSS 100%analysed9.8CVE-2021-1870Apple WebKit logic flaw allows remote code executionA logic issue in Apple's WebKit was addressed with improved restrictions, affecting macOS Big Sur, Catalina, Mojave, iOS and iPadOS, plus WebKitGTK a…KEVEPSS 7.7%analysed9.8CVE-2021-1871Apple WebKit logic flaw allows remote code executionA logic issue in Apple's WebKit was addressed with improved restrictions. It affects macOS Big Sur, Catalina, Mojave, iOS and iPadOS, and a remote at…KEVEPSS 7.0%analysed9.8CVE-2020-16846SaltStack Salt API shell injection via crafted web requestsSaltStack Salt through 3002 is vulnerable to OS command injection when the SSH client is enabled and crafted web requests are sent to the Salt API. T…KEVEPSS 100%analysed

Source: NIST National Vulnerability Database (record CVE-2021-22881), CISA KEV, FIRST EPSS (scores of 2026-09-24). This page is refreshed as NVD updates the record.