Security advisory
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`.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-22903
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 07:59 UTC · Revision 1
Source evidence
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`.
osv:CVE-2021-22903
Complete source record
{
"id": "edcdb6ec5ac65bfdbd9a5b1fa638b213f987c53573459be37b0e42802c154324",
"url": "https://osv.dev/vulnerability/CVE-2021-22903",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-22903",
"summary": "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`.",
"evidence": "osv:CVE-2021-22903",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2021-22903",
"aliases": [
"CVE-2021-22903",
"GHSA-5hq2-xf89-9jxq"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/rails/rails",
"type": "GIT",
"events": [
{
"introduced": "5f3ff60084ab5d5921ca3499814e4697f8350ee7"
},
{
"fixed": "75ac626c4e21129d8296d4206a1960563cc3d4aa"
},
{
"introduced": "b38eb45ad9cb2041b30ac5d4d7b5b6e7b911ff2e"
},
{
"last_affected": "b38eb45ad9cb2041b30ac5d4d7b5b6e7b911ff2e"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:rubyonrails:rails:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "6.1.1"
},
{
"fixed": "6.1.3.2"
}
],
"source": "CPE_RANGE"
},
{
"cpe": "cpe:2.3:a:rubyonrails:rails:6.1.0:rc2:*:*:*:*:*:*",
"range": [
{
"introduced": "6.1.0-rc2"
},
{
"last_affected": "6.1.0-rc2"
}
],
"source": "CPE_STRING"
}
]
}
}
],
"versions": [
"6.1.0-rc2",
"v6.1.3.1",
"v6.1.3",
"v6.1.2",
"v6.1.1",
"v6.1.0.rc2"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-22903.json"
}
}
],
"modified": "2026-10-24T10:31:01.380191908Z",
"provider": "osv",
"references": [
"https://hackerone.com/reports/1148025",
"https://discuss.rubyonrails.org/t/cve-2021-22903-possible-open-redirect-vulnerability-in-action-pack/77867"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2021-22903",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 439773,
"published_at": "2021-06-11T16:15:11.437+00:00"
}