{"id":"CVE-2021-22881","aliases":["DEBIAN-CVE-2021-22881","EUVD-2021-0631","GHSA-8877-prq4-9xfw","UBUNTU-CVE-2021-22881","openSUSE-SU-2024:11318-1","openSUSE-SU-2024:11821-1"],"status":"published","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 leading dot, a specially crafted `Host` header can be used to redirect to a malicious website.","severity":{"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","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-12","score":0.87301,"percentile":0.99757,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-601"],"published":"2021-02-11T16:12:34Z","modified":"2026-10-24T10:30:27Z","exploits":[{"source":"nuclei","id":"CVE-2021-22881","title":"Ruby on Rails - Open Redirect via Host Header Injection","type":"detection template","url":"https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-22881.yaml"}],"fixes":[{"ecosystem":"RubyGems","package":"actionpack","fixed_in":["6.0.3.5","6.1.2.1"],"sources":["ghsa","osv"]},{"ecosystem":"Debian:12","package":"rails","fixed_in":["2:6.0.3.5+dfsg-1"],"sources":["osv"]},{"ecosystem":"Debian:13","package":"rails","fixed_in":["2:6.0.3.5+dfsg-1"],"sources":["osv"]},{"ecosystem":"Debian:14","package":"rails","fixed_in":["2:6.0.3.5+dfsg-1"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"RubyGems","package":"actionpack","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.0.0"},{"last_affected":"6.0.3.4"},{"fixed":"6.0.3.5"}]}]},{"source":"ghsa","ecosystem":"RubyGems","package":"actionpack","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.1.0"},{"last_affected":"6.1.2.0"},{"fixed":"6.1.2.1"}]}]},{"source":"osv","ecosystem":"Debian:12","package":"rails","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2:6.0.3.5+dfsg-1"}]}]},{"source":"osv","ecosystem":"Debian:13","package":"rails","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2:6.0.3.5+dfsg-1"}]}]},{"source":"osv","ecosystem":"Debian:14","package":"rails","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2:6.0.3.5+dfsg-1"}]}]},{"source":"osv","ecosystem":"RubyGems","package":"actionpack","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.0.0"},{"fixed":"6.0.3.5"}]}],"versions":["6.0.0","6.0.1","6.0.1.rc1","6.0.2","6.0.2.1","6.0.2.2","6.0.2.rc1","6.0.2.rc2","6.0.3","6.0.3.1","6.0.3.2","6.0.3.3","6.0.3.4","6.0.3.rc1"]},{"source":"osv","ecosystem":"RubyGems","package":"actionpack","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"6.1.0"},{"fixed":"6.1.2.1"}]}],"versions":["6.1.0","6.1.1","6.1.2"]},{"source":"osv","ecosystem":"Ubuntu:Pro:16.04:LTS","package":"rails","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2:4.1.10-1","2:4.2.5-1","2:4.2.5.1-1","2:4.2.5.2-2","2:4.2.6-1","2:4.2.6-1ubuntu0.1~esm1","2:4.2.6-1ubuntu0.1~esm2"]},{"source":"osv","ecosystem":"Ubuntu:Pro:18.04:LTS","package":"rails","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2:4.2.9-2","2:4.2.9-4","2:4.2.10-0ubuntu4","2:4.2.10-0ubuntu4+esm1","2:4.2.10-0ubuntu4+esm2"]},{"source":"osv","ecosystem":"Ubuntu:Pro:20.04:LTS","package":"rails","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2:5.2.2.1+dfsg-1ubuntu1","2:5.2.3+dfsg-3","2:5.2.3+dfsg-3ubuntu0.1~esm1"]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"rails","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2:6.0.3.7+dfsg-2","2:6.1.4.1+dfsg-8ubuntu2","2:6.1.4.1+dfsg-8ubuntu2+esm1"]},{"source":"osv","ecosystem":"Ubuntu:24.04:LTS","package":"rails","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2:6.1.7.3+dfsg-2build1","2:6.1.7.3+dfsg-3"]},{"source":"osv","ecosystem":"Ubuntu:25.10","package":"rails","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2:6.1.7.3+dfsg-7","2:7.2.2.1+dfsg-7"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"rails","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2:7.2.3+dfsg-2","2:7.2.3.2+dfsg-2"]},{"source":"osv","ecosystem":"Ubuntu:26.04:LTS","package":"rails","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2:7.2.2.1+dfsg-7","2:7.2.2.2+dfsg-2","2:7.2.3+dfsg-2"]},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"rubygem-actionpack-6.0","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"6.0.4.4-1.1"}]}],"bundled":12}],"products":[{"vendor":"fedoraproject","product":"fedora"},{"vendor":"rails","product":"https://github.com/rails/rails"},{"vendor":"rubyonrails","product":"rails"}],"references":[{"url":"https://hackerone.com/reports/1047447","tags":["x_refsource_MISC","x_transferred","Exploit","Patch","Third Party Advisory","fix","web","report"]},{"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","report"]},{"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://rubygems.org/gems/actionpack","tags":["web"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XQ3NS4IBYE2I3MVMGAHFZBZBIZGHXHT3/"},{"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://github.com/rails/rails/commit/b5de7b3a4787d8a55aaad39f477c16e3af65e444","tags":["web"]},{"url":"https://github.com/rails/rails/blob/v6.1.2.1/actionpack/CHANGELOG.md","tags":["web"]},{"url":"https://github.com/advisories/GHSA-8877-prq4-9xfw"},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-22881","tags":["advisory"]},{"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://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XQ3NS4IBYE2I3MVMGAHFZBZBIZGHXHT3","tags":["web"]},{"url":"https://ubuntu.com/security/CVE-2021-22881","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-22881","tags":["report"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2019-16782","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2019-5418","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2020-8164","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2020-8166","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2020-8185","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2020-8264","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2021-22881","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2021-22885","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2021-22902","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2021-22904","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2021-22942","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2021-44528","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2021-22881","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 leading dot, a specially crafted `Host` header can be used to redirect to a malicious website.","status":"published","published":"2021-02-11T16:12:34Z","modified":"2024-08-03T18:58:24.786Z","cwes":["CWE-601"],"updated_at":"2026-11-02T14:32:57.701381Z"}],"euvd":[{"id":"EUVD-2021-0631","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 leading dot, a specially crafted `Host` header can be used to redirect to a malicious website.","status":"published","published":"2021-02-11T16:12:34Z","modified":"2024-08-03T18:58:24Z","updated_at":"2026-11-03T03:25:01.154097Z"}],"ghsa":[{"id":"GHSA-8877-prq4-9xfw","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. ","status":"published","published":"2021-03-02T03:44:17Z","modified":"2023-07-03T22:06:03Z","cvss":[{"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","level":"medium"}],"cwes":["CWE-601"],"updated_at":"2026-11-02T14:36:55.91458Z"}],"nvd":[{"id":"CVE-2021-22881","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 leading dot, a specially crafted `Host` header can be used to redirect to a malicious website.","status":"published","published":"2021-02-11T18:15:17.46Z","modified":"2026-06-17T03:37:56.39Z","cvss":[{"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","level":"medium","assessor":"primary"},{"version":"2.0","score":5.8,"vector":"AV:N/AC:M/Au:N/C:P/I:P/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-601"],"updated_at":"2026-11-02T14:06:50.031227Z"}],"osv":[{"id":"CVE-2021-22881","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 leading dot, a specially crafted `Host` header can be used to redirect to a malicious website.","status":"published","published":"2021-02-11T18:15:17.46Z","modified":"2026-10-24T10:30:27.456654228Z","cvss":[{"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","level":"medium"}],"updated_at":"2026-11-02T15:44:18.367807Z"},{"id":"DEBIAN-CVE-2021-22881","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 leading dot, a specially crafted `Host` header can be used to redirect to a malicious website.","status":"published","published":"2021-02-11T18:15:17.46Z","modified":"2026-10-23T18:03:11.884973869Z","cvss":[{"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","level":"medium"}],"updated_at":"2026-11-02T15:45:34.637046Z"},{"id":"GHSA-8877-prq4-9xfw","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. ","status":"published","published":"2021-03-02T03:44:17Z","modified":"2024-02-20T05:32:38.542795Z","cvss":[{"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","level":"medium"}],"cwes":["CWE-601"],"updated_at":"2026-11-02T15:46:42.077781Z"},{"id":"UBUNTU-CVE-2021-22881","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 leading dot, a specially crafted `Host` header can be used to redirect to a malicious website.","status":"published","published":"2021-02-11T18:15:00Z","modified":"2026-10-17T12:56:19.401000084Z","cvss":[{"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","level":"medium"}],"updated_at":"2026-11-02T15:54:26.29421Z"},{"id":"openSUSE-SU-2024:11318-1","title":"ruby2.7-rubygem-actionpack-6.0-6.0.4-1.2 on GA media","description":"These are all security issues fixed in the ruby2.7-rubygem-actionpack-6.0-6.0.4-1.2 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2024-06-15T00:00:00Z","modified":"2026-02-04T03:46:53.071873Z","updated_at":"2026-11-02T16:58:34.894275Z"},{"id":"openSUSE-SU-2024:11821-1","title":"ruby3.1-rubygem-actionpack-6.0-6.0.4.4-1.1 on GA media","description":"These are all security issues fixed in the ruby3.1-rubygem-actionpack-6.0-6.0.4.4-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2024-06-15T00:00:00Z","modified":"2026-02-04T04:34:58.241748Z","updated_at":"2026-11-02T16:58:35.195147Z"}]}}
