CVE-2021-22903

Source
https://cve.org/CVERecord?id=CVE-2021-22903
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-22903.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-22903
Aliases
Downstream
Published
2021-06-11T16:15:11.437Z
Modified
2026-07-08T21:25:57.969050Z
Severity
  • 6.1 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N CVSS Calculator
Summary
[none]
Details

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.

References

Affected packages

Git / github.com/rails/rails

Affected ranges

Type
GIT
Repo
https://github.com/rails/rails
Events
Database specific
{
    "cpe": [
        "cpe:2.3:a:rubyonrails:rails:*:*:*:*:*:*:*:*",
        "cpe:2.3:a:rubyonrails:rails:6.1.0:rc2:*:*:*:*:*:*"
    ],
    "extracted_events": [
        {
            "introduced": "6.1.1"
        },
        {
            "fixed": "6.1.3.2"
        },
        {
            "introduced": "6.1.0-rc2"
        },
        {
            "last_affected": "6.1.0-rc2"
        }
    ],
    "source": [
        "CPE_RANGE",
        "CPE_STRING"
    ]
}

Affected versions

6.*
6.1.0-rc2
v6.*
v6.1.0.rc2
v6.1.1
v6.1.2
v6.1.3
v6.1.3.1

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-22903.json"