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.04421
epss-percentile: 0.91512
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: 4a0a0047304502201b382644192a55d88c59457e810e42bee5415c3d79957d195a5be24536d2064c022100a0df7a1a987b9166cb2a531570f902ea6d13c5c173dae1e94b405538cf3d811a:922c64590222798bb761d5b6d8e72950
# Visit https://trap.biu.life/ to view exploit trends for this vulnerability.