Vulnerability Name:

CVE-2021-22881 (CCN-196804)

Assigned:2021-02-10
Published:2021-02-10
Updated:2022-01-04
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.
CVSS v3 Severity:6.1 Medium (CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N)
5.3 Medium (Temporal CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N/E:U/RL:O/RC:C)
Exploitability Metrics:Attack Vector (AV): Network
Attack Complexity (AC): Low
Privileges Required (PR): None
User Interaction (UI): Required
Scope:Scope (S): Changed
Impact Metrics:Confidentiality (C): Low
Integrity (I): Low
Availibility (A): None
7.4 High (CCN CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N)
6.4 Medium (CCN Temporal CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:H/A:N/E:U/RL:O/RC:C)
Exploitability Metrics:Attack Vector (AV): Network
Attack Complexity (AC): Low
Privileges Required (PR): None
User Interaction (UI): Required
Scope:Scope (S): Changed
Impact Metrics:Confidentiality (C): None
Integrity (I): High
Availibility (A): None
CVSS v2 Severity:5.8 Medium (CVSS v2 Vector: AV:N/AC:M/Au:N/C:P/I:P/A:N)
Exploitability Metrics:Access Vector (AV): Network
Access Complexity (AC): Medium
Authentication (Au): None
Impact Metrics:Confidentiality (C): Partial
Integrity (I): Partial
Availibility (A): None
6.8 Medium (CCN CVSS v2 Vector: AV:N/AC:L/Au:S/C:N/I:C/A:N)
Exploitability Metrics:Access Vector (AV): Network
Access Complexity (AC): Low
Athentication (Au): Single_Instance
Impact Metrics:Confidentiality (C): None
Integrity (I): Complete
Availibility (A): None
Vulnerability Type:CWE-601
Vulnerability Consequences:Gain Access
References:Source: MITRE
Type: CNA
CVE-2021-22881

Source: MLIST
Type: Mailing List, Mitigation, Third Party Advisory
[oss-security] 20210505 [CVE-2021-22903] Possible Open Redirect Vulnerability in Action Pack

Source: MLIST
Type: Mailing List, Mitigation, Third Party Advisory
[oss-security] 20210819 [CVE-2021-22942] Possible Open Redirect in Host Authorization Middleware

Source: MLIST
Type: Exploit, Mailing List, Patch
[oss-security] 20211214 [CVE-2021-44528] Possible Open Redirect in Host Authorization Middleware

Source: MISC
Type: Patch, Third Party Advisory
https://benjamin-bouchet.com/cve-2021-22881-faille-de-securite-dans-le-middleware-hostauthorization/

Source: CCN
Type: Ruby on Rails Web site
[CVE-2021-22881] Possible Open Redirect in Host Authorization Middleware

Source: MISC
Type: Mitigation, Patch, Vendor Advisory
https://discuss.rubyonrails.org/t/cve-2021-22881-possible-open-redirect-in-host-authorization-middleware/77130

Source: XF
Type: UNKNOWN
rubyonrails-cve202122881-open-redirect(196804)

Source: MISC
Type: Exploit, Patch, Third Party Advisory
https://hackerone.com/reports/1047447

Source: FEDORA
Type: Mailing List, Third Party Advisory
FEDORA-2021-b571fca1b8

Vulnerable Configuration:Configuration 1:
  • cpe:/a:rubyonrails:rails:*:*:*:*:*:*:*:* (Version >= 6.0.0 and < 6.0.3.5)
  • OR cpe:/a:rubyonrails:rails:*:*:*:*:*:*:*:* (Version >= 6.1.0 and < 6.1.2.1)

  • Configuration 2:
  • cpe:/o:fedoraproject:fedora:33:*:*:*:*:*:*:*

  • Configuration CCN 1:
  • cpe:/a:rubyonrails:rails:6.0.3:-:*:*:*:*:*:*
  • OR cpe:/a:rubyonrails:rails:6.1.2:*:*:*:*:*:*:*

  • * Denotes that component is vulnerable
    Oval Definitions
    Definition IDClassTitleLast Modified
    oval:org.opensuse.security:def:113371
    P
    ruby2.7-rubygem-actionpack-6.0-6.0.4-1.2 on GA media (Moderate)
    2022-01-17
    oval:org.opensuse.security:def:106778
    P
    ruby2.7-rubygem-actionpack-6.0-6.0.4-1.2 on GA media (Moderate)
    2021-10-01
    BACK
    rubyonrails rails *
    rubyonrails rails *
    fedoraproject fedora 33
    rubyonrails rails 6.0.3 -
    rubyonrails rails 6.1.2