Vulnerability · Published Feb 11, 2021 · Assigned by hackerone

CVE-2021-22881

Medium 6.1

In plain English

A medium-severity open redirect in https://github.com/rails/rails. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 87.3% (higher than 99.8% of all known vulnerabilities). Ready-made attack tooling exists: Nuclei. Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)6.1Medium
Exploit odds (30 days)87.3%top 0.2% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack tooling1Nuclei

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12rails2:6.0.3.5+dfsg-1DEBIAN-CVE-2021-22881
Debian:13rails2:6.0.3.5+dfsg-1DEBIAN-CVE-2021-22881
Debian:14rails2:6.0.3.5+dfsg-1DEBIAN-CVE-2021-22881
RubyGemsactionpack6.0.3.5GHSA-8877-prq4-9xfw
RubyGemsactionpack6.1.2.1GHSA-8877-prq4-9xfw
Ubuntu:24.04:LTSrailsno fix listedUBUNTU-CVE-2021-22881
Ubuntu:25.10railsno fix listedUBUNTU-CVE-2021-22881
Ubuntu:26.04:LTSrailsno fix listedUBUNTU-CVE-2021-22881
Ubuntu:26.10railsno fix listedUBUNTU-CVE-2021-22881

Affected products (as reported)

VendorProductVersions
n/a https://github.com/rails/rails Fixed in 6.1.2.1, 6.0.3.5

Weakness: CWE-601

References