CVE-2024-21641: Flarum/core Flarum's Logout Route Allows Open Vulnerability

MODERATE
Advisory Identifier: GHSA-733r-8xcp-w9mr
CVSS 6.5
CWE-601
Published
Advisory Summary

CVE-2024-21641 is a MODERATE (CVSS 6.5) flarum's logout route allows open vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Flarum/core libraries in the Packagist ecosystem. The issue involves flarum's logout route allows open redirects. Remediation is available by upgrading affected packages to version 1.8.5.

CVE-2024-21641 at a Glance

CVE Identifier CVE-2024-21641
GHSA Identifier GHSA-733r-8xcp-w9mr
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
Affected Product Flarum/core
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2024-21641

To remediate this vulnerability, upgrade all affected Flarum/core dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

flarum/core fixed: 1.8.5
Upgrade flarum/core to 1.8.5
flarum/framework fixed: 1.8.5
Upgrade flarum/framework to 1.8.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for flarum/core

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-21641, inspect your project dependencies for Flarum/core:

inspect dependencies for flarum/core

Analyze the terminal output to locate any version of Flarum/core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.8.5), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Flarum/core, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact 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. Sample: `example.com/logout?return=https://google.com`. 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. Some ecosystem extensions modifying the logout route have already been affected. Sample: https://discuss.flarum.org/d/22229-premium-wordpress-integration/526 ### Patches The vulnerability has been fixed and published as flarum/core v1.8.5. All communities running Flarum should upgrade as soon as possible to v1.8.5 using: `composer update --prefer-dist --no-dev -a -W` You can then confirm you run the latest version using: `composer show flarum/core` ### Workarounds Some extensions modifying the logout route can remedy this issue if their implementation is safe. In any case we recommend updating to 1.8.5. ### References For any questions or comments on this vulnerability, please visit https://discuss.flarum.org/ For support questions, create a discussion at https://discuss.flarum.org/t/support. A reminder that if you ever become aware of a security issue in Flarum, please report it to us privately by emailing [security@flarum.org](mailto:security@flarum.org), and we will address it promptly.

CVE-2024-21641 Affected Flarum/core Versions

2 component(s)
Fixed Versions:
1.8.5
Product / Package Ecosystem Affected Versions Fixed Version
flarum/core
Packagist
< 1.8.5
1.8.5
flarum/framework
Packagist
< 1.8.5
1.8.5

References

Frequently Asked Questions

What is CVE-2024-21641?
CVE-2024-21641 is a security vulnerability in Flarum/core involving Flarum's logout Route allows open redirects under CWE-601: URL Redirection to Untrusted Site ('Open Redirect').
Which Flarum/core versions are affected?
Affected versions include releases prior to 1.8.5 across affected packages: flarum/core, flarum/framework.
What version fixes CVE-2024-21641?
Upgrading to 1.8.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is flarum/core affected?
Yes, flarum/core is affected in releases prior to 1.8.5. Upgrade your dependency to 1.8.5 or later.
Is flarum/framework affected?
Yes, flarum/framework is affected in releases prior to 1.8.5. Upgrade your dependency to 1.8.5 or later.
What is the CVSS score of CVE-2024-21641?
CVE-2024-21641 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2024-21641?
CVE-2024-21641 is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect') (The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.).
How can I check Packagist dependencies for CVE-2024-21641?
Run the dependency tree command: 'inspect dependencies for flarum/core'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-733r-8xcp-w9mr",
  "modified" : "2025-01-17T18:15:18Z",
  "published" : "2024-01-05T20:53:17Z",
  "aliases" : [ "CVE-2024-21641" ],
  "summary" : "Flarum's logout Route allows open redirects",
  "details" : "### Impact\nThe 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. Sample: `example.com/logout?return=https://google.com`. 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.\n\nSome ecosystem extensions modifying the logout route have already been affected. Sample: https://discuss.flarum.org/d/22229-premium-wordpress-integration/526\n\n### Patches\nThe vulnerability has been fixed and published as flarum/core v1.8.5. All communities running Flarum should upgrade as soon as possible to v1.8.5 using:\n\n`composer update --prefer-dist --no-dev -a -W`\n\nYou can then confirm you run the latest version using:\n\n`composer show flarum/core`\n\n### Workarounds\nSome extensions modifying the logout route can remedy this issue if their implementation is safe. In any case we recommend updating to 1.8.5.\n\n### References\nFor any questions or comments on this vulnerability, please visit https://discuss.flarum.org/\n\nFor support questions, create a discussion at https://discuss.flarum.org/t/support.\n\nA reminder that if you ever become aware of a security issue in Flarum, please report it to us privately by emailing [security@flarum.org](mailto:security@flarum.org), and we will address it promptly.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "flarum/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.8.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "flarum/framework"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.8.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/flarum/framework/security/advisories/GHSA-733r-8xcp-w9mr"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-21641"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/flarum/flarum-core/commit/ee8b3b4ad1413a2b0971fdd9e40f812d2a3a9d3a"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/flarum/framework/commit/7d70328471cf3091d92d95c382d277aec7996176"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-601" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-01-05T20:53:17Z",
    "nvd_published_at" : "2024-01-05T21:15:43Z"
  }
}