{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2021-22881","id":"CVE-2021-22881","title":"Actionpack Open Redirect Vulnerability ","description":"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","descriptionLong":"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.","published":"2021-02-11T16:12:34.000Z","updated":"2026-10-24T10:30:27.456654228Z","reserved":"2021-01-06T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"hackerone","metric":{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"NVD"},"metrics":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"NVD"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"OSV"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","rating":"medium","source":"GitHub"},{"version":"2.0","score":5.8,"vector":"AV:N/AC:M/Au:N/C:P/I:P/A:N","rating":"medium","source":"NVD"}],"rating":"medium","products":["https://github.com/rails/rails"],"affectedProducts":[{"vendor":"n/a","product":"https://github.com/rails/rails","defaultStatus":null,"versions":[{"status":"affected","version":"Fixed in 6.1.2.1, 6.0.3.5"}],"platforms":[]}],"packages":[{"ecosystem":"RubyGems","name":"actionpack","purl":"pkg:gem/actionpack","ranges":[">=6.0.0 <6.0.3.5",">=6.1.0 <6.1.2.1"],"fixed":["6.0.3.5","6.1.2.1"],"advisory":"GHSA-8877-prq4-9xfw"}],"cwes":["CWE-601"],"aliases":["GHSA-8877-prq4-9xfw"],"references":[{"url":"https://hackerone.com/reports/1047447","tags":["x_refsource_MISC","x_transferred","Exploit","Patch","Third Party Advisory","fix","web"]},{"url":"https://discuss.rubyonrails.org/t/cve-2021-22881-possible-open-redirect-in-host-authorization-middleware/77130","tags":["x_refsource_MISC","x_transferred","Mitigation","Patch","Vendor Advisory","fix","web"]},{"url":"https://benjamin-bouchet.com/cve-2021-22881-faille-de-securite-dans-le-middleware-hostauthorization/","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XQ3NS4IBYE2I3MVMGAHFZBZBIZGHXHT3/","tags":["vendor-advisory","x_refsource_FEDORA","x_transferred","web"]},{"url":"http://www.openwall.com/lists/oss-security/2021/05/05/2","tags":["mailing-list","x_refsource_MLIST","x_transferred","Mailing List","Mitigation","Third Party Advisory","advisory","web"]},{"url":"http://www.openwall.com/lists/oss-security/2021/08/20/1","tags":["mailing-list","x_refsource_MLIST","x_transferred","Mailing List","Mitigation","Third Party Advisory","advisory","web"]},{"url":"http://www.openwall.com/lists/oss-security/2021/12/14/5","tags":["mailing-list","x_refsource_MLIST","x_transferred","Exploit","Mailing List","Patch","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-22881","tags":["advisory"]},{"url":"https://github.com/rails/rails/commit/b5de7b3a4787d8a55aaad39f477c16e3af65e444","tags":["web"]},{"url":"https://benjamin-bouchet.com/cve-2021-22881-faille-de-securite-dans-le-middleware-hostauthorization","tags":["web"]},{"url":"https://github.com/rails/rails","tags":["web"]},{"url":"https://github.com/rails/rails/blob/v6.1.2.1/actionpack/CHANGELOG.md","tags":["web"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2021-22881.yml","tags":["web"]},{"url":"https://groups.google.com/g/rubyonrails-security/c/zN_3qA26l6E","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XQ3NS4IBYE2I3MVMGAHFZBZBIZGHXHT3","tags":["web"]},{"url":"https://rubygems.org/gems/actionpack","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.87301,"epssPercentile":0.99757,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2021-22881","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-22881","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2021-22881","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-8877-prq4-9xfw","ok":true,"note":"GHSA-8877-prq4-9xfw"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2021-22881","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":["ruby"],"critical":[],"attention":null}