{"schemaVersion":3,"id":"CVE-2021-22881","aliases":["UBUNTU-CVE-2021-22881","DEBIAN-CVE-2021-22881","GHSA-8877-prq4-9xfw"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2021-02-11T16:12:34.000Z","modified":"2024-08-03T18:58:24.786Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":6.1,"severity":"medium","version":"3.1","versionLabel":"v3.1","source":"NVD","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":6.1,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","exploitability":7.2,"impact":4.5,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":6.1,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","exploitability":7.2,"impact":4.5,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Rubygems","score":6.1,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","exploitability":7.2,"impact":4.5,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":6.1,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","exploitability":null,"impact":null,"computed":false},{"version":"2.0","versionLabel":"v2.0","source":"NVD","score":5.8,"severity":"medium","vector":"AV:N/AC:M/Au:N/C:P/I:P/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.87301,"percentile":0.99755,"severity":"critical","asOf":"2026-10-21T00:00:00.000Z","change":{"pp":0,"baselineDate":"2026-09-21T00:00:00.000Z","baselineScore":0.87301},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.87301,"percentile":0.99755}],"last30":[{"date":"2026-09-21T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-20T00:00:00.000Z","score":0.87301,"percentile":null},{"date":"2026-10-21T00:00:00.000Z","score":0.87301,"percentile":0.99755}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"REF_ED315C37031DACE0","name":"Exploit Reference (hackerone.com)","source":"reference","url":"https://hackerone.com/reports/1047447","maturity":"unknown","reliabilityScore":0.2,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null},{"id":"REF_4BD7FAA9A70B518F","name":"Exploit Reference (openwall.com)","source":"reference","url":"http://www.openwall.com/lists/oss-security/2021/12/14/5","maturity":"unknown","reliabilityScore":0.2,"verified":false,"type":null,"platforms":[],"requiresAuth":null,"exploitdb":null,"metasploit":null}],"exploitCount":2,"weaknesses":[{"id":"CWE-601","name":"URL Redirection to Untrusted Site ('Open Redirect')","description":"The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.","type":"weakness","status":"Draft","abstraction":"Base","likelihoodOfExploit":"Low","url":"https://cwe.mitre.org/data/definitions/601.html"}],"affected":[{"vendor":"debian","product":"rails","name":"rails","label":"rails","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/rails","purlType":"deb","versions":[{"text":"< 2:6.0.3.5+dfsg-1","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 2:6.0.3.5+dfsg-1","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"rails","name":"rails","label":"rails","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/rails","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"fedoraproject","product":"fedora","name":"fedora","label":"fedora","ecosystem":null,"cpePart":"o","purl":null,"purlType":null,"versions":[{"text":"33","noFixRecorded":false,"fixedIn":null}],"versionsText":"33","eol":{"isEol":true,"eolDate":"2021-11-30T00:00:00.000Z","matchMethod":"cpe","cycle":{"name":"33","label":"33","eolFrom":"2021-11-30T00:00:00.000Z","isLts":false,"isMaintained":false,"latestVersion":null},"product":{"name":"fedora","label":"Fedora Linux","category":"os"}},"hubHref":"/vendor/fedoraproject/fedora"},{"vendor":"RubyGems","product":"actionpack","name":"actionpack","label":"actionpack","ecosystem":"RubyGems","cpePart":null,"purl":"pkg:gem/actionpack","purlType":"gem","versions":[{"text":"≥ 6.0.0, < 6.0.3.5","noFixRecorded":false,"fixedIn":null},{"text":"≥ 6.1.0, < 6.1.2.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 6.0.0, < 6.0.3.5 | ≥ 6.1.0, < 6.1.2.1","eol":null,"hubHref":null},{"vendor":"rubyonrails","product":"rails","name":"rails","label":"rails","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ 6.0.0, < 6.0.3.5","noFixRecorded":false,"fixedIn":null},{"text":"≥ 6.1.0, < 6.1.2.1","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 6.0.0, < 6.0.3.5 | ≥ 6.1.0, < 6.1.2.1","eol":{"isEol":null,"eolDate":null,"matchMethod":"cpe","cycle":null,"product":{"name":"rails","label":"Ruby on Rails","category":"framework"}},"hubHref":"/vendor/rubyonrails/rails"}],"affectedCount":5,"eol":{"hasEol":true,"count":1},"references":[{"url":"https://hackerone.com/reports/1047447","label":"hackerone.com/reports/1047447","hostname":"hackerone.com","tags":["X Refsource MISC","REPORT","WEB","Exploit","Patch","Third Party Advisory"]},{"url":"https://discuss.rubyonrails.org/t/cve-2021-22881-possible-open-redirect-in-host-authorization-middleware/77130","label":"discuss.rubyonrails.org/t/…","hostname":"discuss.rubyonrails.org","tags":["X Refsource MISC","REPORT","WEB","Mitigation","Patch","Vendor Advisory"]},{"url":"https://benjamin-bouchet.com/cve-2021-22881-faille-de-securite-dans-le-middleware-hostauthorization/","label":"benjamin-bouchet.com/cve-2021-22881-faille-de-securite-dans-le-middleware-hostauthorization/","hostname":"benjamin-bouchet.com","tags":["X Refsource MISC","Patch","Third Party Advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XQ3NS4IBYE2I3MVMGAHFZBZBIZGHXHT3/","label":"lists.fedoraproject.org/archives/…","hostname":"lists.fedoraproject.org","tags":["Vendor Advisory","X Refsource FEDORA"]},{"url":"http://www.openwall.com/lists/oss-security/2021/05/05/2","label":"www.openwall.com/lists/oss-security/2021/05/05/2","hostname":"www.openwall.com","tags":["Mailing List","X Refsource MLIST","WEB","Mitigation","Third Party Advisory"]},{"url":"http://www.openwall.com/lists/oss-security/2021/08/20/1","label":"www.openwall.com/lists/oss-security/2021/08/20/1","hostname":"www.openwall.com","tags":["Mailing List","X Refsource MLIST","WEB","Mitigation","Third Party Advisory"]},{"url":"http://www.openwall.com/lists/oss-security/2021/12/14/5","label":"www.openwall.com/lists/oss-security/2021/12/14/5","hostname":"www.openwall.com","tags":["Mailing List","X Refsource MLIST","WEB","Exploit","Patch"]},{"url":"https://ubuntu.com/security/CVE-2021-22881","label":"ubuntu.com/security/CVE-2021-22881","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-22881","label":"www.cve.org/CVERecord?id=CVE-2021-22881","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2021-22881","label":"security-tracker.debian.org/tracker/CVE-2021-22881","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-22881","label":"nvd.nist.gov/vuln/detail/CVE-2021-22881","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/rails/rails/commit/b5de7b3a4787d8a55aaad39f477c16e3af65e444","label":"github.com/rails/rails/commit/b5de7b3a4787d8a55aaad39f477c16e3af65e444","hostname":"github.com","tags":["WEB"]},{"url":"https://benjamin-bouchet.com/cve-2021-22881-faille-de-securite-dans-le-middleware-hostauthorization","label":"benjamin-bouchet.com/cve-2021-22881-faille-de-securite-dans-le-middleware-hostauthorization","hostname":"benjamin-bouchet.com","tags":["WEB"]},{"url":"https://github.com/rails/rails","label":"github.com/rails/rails","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/rails/rails/blob/v6.1.2.1/actionpack/CHANGELOG.md","label":"github.com/rails/rails/blob/v6.1.2.1/actionpack/CHANGELOG.md","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2021-22881.yml","label":"github.com/rubysec/ruby-advisory-db/blob/master/gems/actionpack/CVE-2021-22881.yml","hostname":"github.com","tags":["WEB"]},{"url":"https://groups.google.com/g/rubyonrails-security/c/zN_3qA26l6E","label":"groups.google.com/g/rubyonrails-security/c/zN_3qA26l6E","hostname":"groups.google.com","tags":["WEB"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XQ3NS4IBYE2I3MVMGAHFZBZBIZGHXHT3","label":"lists.fedoraproject.org/archives/…","hostname":"lists.fedoraproject.org","tags":["WEB"]},{"url":"https://rubygems.org/gems/actionpack","label":"rubygems.org/gems/actionpack","hostname":"rubygems.org","tags":["WEB"]}],"lineage":{"upstream":[],"downstream":["OPENSUSE-SU-2024:11821-1"],"duplicates":[],"related":["OPENSUSE-SU-2024:11821-1"]},"timeline":[{"kind":"published","date":"2021-02-11T16:12:34.000Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2024-08-03T18:58:24.786Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":52,"level":"high","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-21T14:32:29.832Z","stale":false,"partial":false}}