{
    "data_type": "CVE",
    "data_format": "MITRE",
    "data_version": "4.0",
    "CVE_data_meta": {
        "ID": "CVE-2021-22881",
        "ASSIGNER": "support@hackerone.com",
        "STATE": "PUBLIC"
    },
    "affects": {
        "vendor": {
            "vendor_data": [
                {
                    "vendor_name": "n/a",
                    "product": {
                        "product_data": [
                            {
                                "product_name": "https://github.com/rails/rails",
                                "version": {
                                    "version_data": [
                                        {
                                            "version_value": "Fixed in 6.1.2.1, 6.0.3.5"
                                        }
                                    ]
                                }
                            }
                        ]
                    }
                }
            ]
        }
    },
    "problemtype": {
        "problemtype_data": [
            {
                "description": [
                    {
                        "lang": "eng",
                        "value": "Open Redirect (CWE-601)"
                    }
                ]
            }
        ]
    },
    "references": {
        "reference_data": [
            {
                "refsource": "MISC",
                "name": "https://hackerone.com/reports/1047447",
                "url": "https://hackerone.com/reports/1047447"
            },
            {
                "refsource": "MISC",
                "name": "https://discuss.rubyonrails.org/t/cve-2021-22881-possible-open-redirect-in-host-authorization-middleware/77130",
                "url": "https://discuss.rubyonrails.org/t/cve-2021-22881-possible-open-redirect-in-host-authorization-middleware/77130"
            },
            {
                "refsource": "MISC",
                "name": "https://benjamin-bouchet.com/cve-2021-22881-faille-de-securite-dans-le-middleware-hostauthorization/",
                "url": "https://benjamin-bouchet.com/cve-2021-22881-faille-de-securite-dans-le-middleware-hostauthorization/"
            },
            {
                "refsource": "FEDORA",
                "name": "FEDORA-2021-b571fca1b8",
                "url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XQ3NS4IBYE2I3MVMGAHFZBZBIZGHXHT3/"
            },
            {
                "refsource": "MLIST",
                "name": "[oss-security] 20210505 [CVE-2021-22903] Possible Open Redirect Vulnerability in Action Pack",
                "url": "http://www.openwall.com/lists/oss-security/2021/05/05/2"
            },
            {
                "refsource": "MLIST",
                "name": "[oss-security] 20210819 [CVE-2021-22942] Possible Open Redirect in Host Authorization Middleware",
                "url": "http://www.openwall.com/lists/oss-security/2021/08/20/1"
            },
            {
                "refsource": "MLIST",
                "name": "[oss-security] 20211214 [CVE-2021-44528] Possible Open Redirect in Host Authorization Middleware",
                "url": "http://www.openwall.com/lists/oss-security/2021/12/14/5"
            }
        ]
    },
    "description": {
        "description_data": [
            {
                "lang": "eng",
                "value": "The Host Authorization middleware in Action Pack before 6.1.2.1, 6.0.3.5 suffers from an 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. Impacted applications will have allowed hosts with a leading dot. When an allowed host contains a leading dot, a specially crafted `Host` header can be used to redirect to a malicious website."
            }
        ]
    }
}