Description
Specially crafted X-Forwarded-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.
Specially crafted X-Forwarded-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.
id: CVE-2021-44528
info:
name: Open Redirect in Host Authorization Middleware
author: geeknik,jakxx
severity: medium
description: |
Specially crafted X-Forwarded-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.
impact: |
This vulnerability can lead to phishing attacks, where users are tricked into visiting malicious websites and disclosing sensitive information.
remediation: |
Apply the latest security patches or updates provided by the vendor to fix the Open Redirect vulnerability in the Host Authorization Middleware.
reference:
- https://seclists.org/oss-sec/2021/q4/att-160/7-0-host-authorzation-open-redirect.patch
- https://github.com/rails/rails/commit/0fccfb9a3097a9c4260c791f1a40b128517e7815
- https://www.debian.org/security/2023/dsa-5372
- https://security.netapp.com/advisory/ntap-20240208-0003/
- https://nvd.nist.gov/vuln/detail/CVE-2021-44528
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
cvss-score: 6.1
cve-id: CVE-2021-44528
epss-score: 0.04182
epss-percentile: 0.90655
cwe-id: CWE-601
metadata:
verified: true
max-request: 1
vendor: rubyonrails
product: rails
shodan-query: cpe:"cpe:2.3:a:rubyonrails:rails"
tags: cve,cve2021,redirect,rubyonrails
http:
- raw:
- |
GET / HTTP/1.1
Host: {{Hostname}}
X-Forwarded-Host: //interact.sh
matchers:
- type: dsl
dsl:
- 'regex("(?i)location:\\s*(?:https?://|//)[^\\s]*interact\\.sh", header)'
- 'regex("(?i)(?:set-cookie:.*_[\\w-]+_session=|x-runtime:)", header)'
- 'status_code == 301 || status_code == 302 || status_code == 307 || status_code == 308'
condition: and
# digest: 490a00463044022062d4040f4cf9c7dc7df008b18a5993923fe7572f9acf2858e9bd26c5890f28b60220532fc2aa6dddc4f96c504341b212e8b4dbd40f3bcbff4b912fcd7856881e1237:922c64590222798bb761d5b6d8e72950
# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.