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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| RubyGems | actionpack | 6.1.3.2 | GHSA-5hq2-xf89-9jxq |
| Ubuntu:24.04:LTS | rails | no fix listed | UBUNTU-CVE-2021-22903 |
| Ubuntu:25.10 | rails | no fix listed | UBUNTU-CVE-2021-22903 |
| Ubuntu:26.04:LTS | rails | no fix listed | UBUNTU-CVE-2021-22903 |
| Ubuntu:26.10 | rails | no fix listed | UBUNTU-CVE-2021-22903 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| n/a | https://github.com/rails/rails | Fixed in 6.1.3.2 |
Weakness: CWE-601