Open Redirect in Rubyonrails Rails
CVE-2021-22903
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`.
Vulnerability class: Open Redirect
EPSS: 0.012 (65.7th percentile) — read the EPSS interpretation.
CVSS v3 metric
CVSS v3 base score 6.1 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
Affected products
- Rubyonrails Rails — versions 6.1.0
- N/a Https://github.com/rails/rails — versions Fixed in 6.1.3.2
Weakness classification (CWE)
References
- support@hackerone.com (Permissions Required, Third Party Advisory, x_refsource_MISC)
- support@hackerone.com (Patch, x_refsource_MISC, Mitigation, Vendor Advisory)
Frequently asked questions
- What is CVE-2021-22903?
- CVE-2021-22903 is a medium-severity vulnerability in Rubyonrails Rails, classified under URL Redirection to Untrusted Site (Open Redirect). CVSS score: 6.1/10. Published 2021-06-11.
- How severe is CVE-2021-22903?
- Medium severity. CVSS v3 base score is 6.1 out of 10.