{"id":"CVE-2021-22881","aliases":["CVE-2021-22881","GHSA-8877-prq4-9xfw"],"related":[],"kind":"vulnerability","state":"published","title":"Actionpack Open Redirect Vulnerability","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"El middleware de Autorización de Host en Action Pack versiones anteriores a 6.1.2.1, 6.0.3.5 sufre una vulnerabilidad de redireccionamiento abierto.&#xa0;Los encabezados \"Host\" especialmente diseñados en combinación con determinados formatos \"allowed host\" pueden causar que el middleware de Autorización del Host en Action Pack redireccione a los usuarios a un sitio web malicioso.&#xa0;Las aplicaciones afectadas habrán permitido hosts con un punto inicial.&#xa0;Cuando un host permitido contiene un punto inicial, un encabezado \"Host\" especialmente diseñado puede ser usado para redireccionar hacia un sitio web malicioso","source":"nvd"}],"published":"2021-02-11T16:12:34.000Z","modified":"2026-06-17T03:37:56.390Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:P/I:P/A:N","score":5.8,"rating":"MEDIUM"}],"cwes":["CWE-601"],"affected":[{"ranges":[{"version":"Fixed in 6.1.2.1, 6.0.3.5","status":"affected"}],"product":"https://github.com/rails/rails","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"6.0.0","status":"affected","fixed":"6.0.3.5"}],"ecosystem":"RubyGems","package":"actionpack","purl":"pkg:gem/actionpack","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.1.0","status":"affected","fixed":"6.1.2.1"}],"ecosystem":"RubyGems","package":"actionpack","purl":"pkg:gem/actionpack","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"6.0.0","fixed":"6.0.3.5"},{"status":"affected","introduced":"6.1.0","fixed":"6.1.2.1"}],"vendor":"rubyonrails","product":"rails","cpe":"cpe:2.3:a:rubyonrails:rails:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"33"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://hackerone.com/reports/1047447","tags":["exploit","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://discuss.rubyonrails.org/t/cve-2021-22881-possible-open-redirect-in-host-authorization-middleware/77130","tags":["mitigation","patch","vendor-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://benjamin-bouchet.com/cve-2021-22881-faille-de-securite-dans-le-middleware-hostauthorization/","tags":["patch","third-party-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XQ3NS4IBYE2I3MVMGAHFZBZBIZGHXHT3/","tags":["vendor-advisory","x-refsource-fedora","x-transferred"],"sources":["cvelist","nvd"]},{"url":"http://www.openwall.com/lists/oss-security/2021/05/05/2","tags":["mailing-list","mitigation","third-party-advisory","web","x-refsource-mlist","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"http://www.openwall.com/lists/oss-security/2021/08/20/1","tags":["mailing-list","mitigation","third-party-advisory","web","x-refsource-mlist","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"http://www.openwall.com/lists/oss-security/2021/12/14/5","tags":["exploit","mailing-list","patch","web","x-refsource-mlist","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-22881","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/rails/rails/commit/b5de7b3a4787d8a55aaad39f477c16e3af65e444","tags":["web"],"sources":["ghsa"]},{"url":"https://benjamin-bouchet.com/cve-2021-22881-faille-de-securite-dans-le-middleware-hostauthorization","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/rails/rails","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/rails/rails/blob/v6.1.2.1/actionpack/CHANGELOG.md","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2021-22881.yml","tags":["web"],"sources":["ghsa"]},{"url":"https://groups.google.com/g/rubyonrails-security/c/zN_3qA26l6E","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XQ3NS4IBYE2I3MVMGAHFZBZBIZGHXHT3","tags":["web"],"sources":["ghsa"]},{"url":"https://rubygems.org/gems/actionpack","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"hackerone","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-22881","url":"https://www.cve.org/CVERecord?id=CVE-2021-22881","licence":"CVE Terms of Use","modified":"2024-08-03T18:58:24.786Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8877-prq4-9xfw","url":"https://github.com/advisories/GHSA-8877-prq4-9xfw","licence":"CC-BY-4.0","modified":"2024-02-20T05:32:38.542Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-22881","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-22881","licence":"Public domain","modified":"2026-06-17T03:37:56.390Z"}],"updatedAt":"2026-11-25T22:57:59.907Z","epss":{"score":0.87301,"percentile":0.99752,"date":"2026-12-01T12:00:22.000Z"}}