CVE-2021-22903
MEDIUM 6.1CVSS 3.1Possible Open Redirect Vulnerability in Action Pack
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.
- Published
- 11 Jun 2021
- Last modified
- 17 Jun 2026
- Assigned by
- support@hackerone.com
- NVD status
- Modified
- Weakness
- CWE-601
- Also known as
- GHSA-5hq2-xf89-9jxq
- Sources
- NVDJSONOSV GHSA-5hq2-xf89-9jxqJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.8 | AV:N/AC:M/Au:N/C:P/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | rubyonrails | railscpe:2.3:a:rubyonrails:rails:*:*:*:*:*:*:*:* |
>= 6.1.1, < 6.1.3.2 | 6.1.3.2 |
| NVD | rubyonrails | railscpe:2.3:a:rubyonrails:rails:6.1.0:rc2:*:*:*:*:*:* |
= 6.1.0 | |
| OSV | RubyGems | actionpack | >= 6.1.0.rc2, < 6.1.3.2 | 6.1.3.2 |
References
- https://discuss.rubyonrails.org/t/cve-2021-22903-possible-open-redirect-vulnerability-in-action-pack/77867 · Mitigation, Patch, Vendor Advisory, WEB
- https://hackerone.com/reports/1148025 · Permissions Required, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2021-22903 · ADVISORY
- https://github.com/rails/rails/releases/tag/v6.1.3.2 · WEB
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2021-22903.yml · WEB
- https://groups.google.com/g/rubyonrails-security/c/8TxqXEtgSF0 · WEB
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 11 Jun 2021)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 5 May 2021)