{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "versions": [
              {
                "introduced": "6.1.1"
              },
              {
                "fixed": "6.1.3.2"
              },
              {
                "introduced": "0"
              },
              {
                "last_affected": "6.1.0-rc2"
              }
            ]
          },
          "events": [
            {
              "introduced": "5f3ff60084ab5d5921ca3499814e4697f8350ee7"
            },
            {
              "fixed": "75ac626c4e21129d8296d4206a1960563cc3d4aa"
            },
            {
              "introduced": "0"
            },
            {
              "last_affected": "b38eb45ad9cb2041b30ac5d4d7b5b6e7b911ff2e"
            }
          ],
          "repo": "https://github.com/rails/rails",
          "type": "GIT"
        }
      ]
    }
  ],
  "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 \u003c\u003c \"sub.example.com\"` to permit a request with a Host header value of `sub-example.com`.",
  "id": "CVE-2021-22903",
  "modified": "2026-03-13T21:54:35.248226656Z",
  "published": "2021-06-11T16:15:11.437Z",
  "references": [
    {
      "type": "REPORT",
      "url": "https://hackerone.com/reports/1148025"
    },
    {
      "type": "FIX",
      "url": "https://discuss.rubyonrails.org/t/cve-2021-22903-possible-open-redirect-vulnerability-in-action-pack/77867"
    }
  ],
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
      "type": "CVSS_V3"
    }
  ]
}