Vulnerability · Published Jun 11, 2021 · Assigned by hackerone

CVE-2021-22903

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 1.2% (higher than 69% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)6.1Medium
Exploit odds (30 days)1.2%top 30.9% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official description

The actionpack ruby gem before 6.1.3.2 suffers from a possible 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. This is similar to CVE-2021-22881. Strings in config.hosts that do not have a leading dot are converted to regular expressions without proper escaping. This causes, for example, `config.hosts << "sub.example.com"` to permit a request with a Host header value of `sub-example.com`.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
RubyGemsactionpack6.1.3.2GHSA-5hq2-xf89-9jxq
Ubuntu:24.04:LTSrailsno fix listedUBUNTU-CVE-2021-22903
Ubuntu:25.10railsno fix listedUBUNTU-CVE-2021-22903
Ubuntu:26.04:LTSrailsno fix listedUBUNTU-CVE-2021-22903
Ubuntu:26.10railsno fix listedUBUNTU-CVE-2021-22903

Affected products (as reported)

VendorProductVersions
n/a https://github.com/rails/rails Fixed in 6.1.3.2

Weakness: CWE-601

References