CVE-2021-22903: rubyonrails rails URL Redirection to Untrusted Site
Vulnerability summary
CVE-2021-22903 is a medium (CVSS 6.1) URL Redirection to Untrusted Site vulnerability in rubyonrails rails. EPSS estimates a 1.23% chance of exploitation in the next 30 days, higher than 69.9% of scored vulnerabilities.
Not severe (CVSS 6.1, network access); no exploitation reported by the 5 checked sources
CIRCL last checked 05-12-2026
Source freshness unavailable
How is this decided?Timeline
- 11-06-2021PublishedVulnerability first disclosed.
- 03-08-2024Last modifiedVulnerability information updated.
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`.
CVSS metrics
4 scores · 3 sources · 2 versions- OSV · UbuntuEcosystem advisory · calculated6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- OSV · RubygemsEcosystem advisory · calculated6.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS trend
Probability
1.23%
Chance of exploitation in the next 30 days
Percentile
70%
Versus all other CVEs
30-day change
No change 0.00 pp
From 1.23% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, user interaction (CVSS vector). Other conditions: not stated in public data.
RubyGems1 product
- actionpack≥ 6.1.0.rc2, < 6.1.3.2
Rubyonrails1 product
- railsEOL≥ 6.1.1, < 6.1.3.2 | 6.1.0:rc2
Ubuntu1 product
- railsAll versions (No fix recorded)
3 vendors · 3 products
References
8 links- discuss.rubyonrails.org/t/cve-2021-22903-possible-open-redirect-vulnerability-in-action-pack/77867X Refsource MISCWEBMitigationPatchVendor Advisory