CVE-2023-22489: Flarum/core Any Flarum User Including Unactivated Vulnerability

LOW
Advisory Identifier: GHSA-hph3-hv3c-7725
CVSS 3.5
CWE-862
Published
Advisory Summary

CVE-2023-22489 is a LOW (CVSS 3.5) any flarum user including unactivated vulnerability (CWE-862: Missing Authorization) affecting Flarum/core libraries in the Packagist ecosystem. The issue involves any flarum user including unactivated can reply in public discussions whose first post was permanently deleted. Remediation is available by upgrading affected packages to version 1.6.3.

CVE-2023-22489 at a Glance

CVE Identifier CVE-2023-22489
GHSA Identifier GHSA-hph3-hv3c-7725
Severity LOW
CVSS v3.1 Base Score 3.5
CWE Classification CWE-862: Missing Authorization
Affected Product Flarum/core
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 3.5

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

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

How to Fix CVE-2023-22489

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.6.3
Upgrade flarum/core to 1.6.3
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-2023-22489, 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.6.3), 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-862: Missing Authorization, where the product does not perform an authorization check when an actor attempts to access a resource or perform an action. 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

If the first post of a discussion is permanently deleted but the discussion stays visible, any actor who can view the discussion is able to create a new reply via the REST API, no matter the reply permission or lock status. This includes users that don't have a validated email. Guests cannot successfully create a reply because the API will fail with a 500 error when the user ID 0 is inserted into the database. This should also be fixed to return the expected 401/403 status. This happens because when the first post of a discussion is permanently deleted, the `first_post_id` attribute of the discussion becomes `null` which causes access control to be skipped for all new replies. Flarum automatically makes discussions with zero comments invisible so an additional condition for this vulnerability is that the discussion must have at least one approved reply so that `discussions.comment_count` is still above zero after the post deletion. ### Impact This can open the discussion to uncontrolled spam or just unintentional replies if users still had their tab open before the vulnerable discussion was locked and then post a reply when they shouldn't be able to. In combination with the email notification settings, this could also be used as a way to send unsolicited emails. Versions between `v1.3.0` and `v1.6.3` are impacted. ### Patches The vulnerability has been fixed and published as flarum/core v1.6.3. All communities running Flarum should upgrade as soon as possible to v1.6.3 using: ``` composer update --prefer-dist --no-dev -a -W ``` You can then confirm you run the latest version using: ``` composer show flarum/core ``` ### Workarounds If you don't delete the first posts you are not affected. A workaround can be to delete the discussion itself, or amend the database to manually set a `first_post_id`. ### For more information 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-2023-22489 Affected Flarum/core Versions

1 component(s)
Fixed Versions:
1.6.3
Product / Package Ecosystem Affected Versions Fixed Version
flarum/core
Packagist
≥ 1.3.0
< 1.6.3
1.6.3

References

Frequently Asked Questions

What is CVE-2023-22489?
CVE-2023-22489 is a security vulnerability in Flarum/core involving Any Flarum user including unactivated can reply in public discussions whose first post was permanently deleted under CWE-862: Missing Authorization.
Which Flarum/core versions are affected?
Affected versions include releases prior to 1.6.3 across affected packages: flarum/core.
What version fixes CVE-2023-22489?
Upgrading to 1.6.3 (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.6.3. Upgrade your dependency to 1.6.3 or later.
What is the CVSS score of CVE-2023-22489?
CVE-2023-22489 has a CVSS v3.1 base score of 3.5 (LOW) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2023-22489?
CVE-2023-22489 is classified under CWE-862: Missing Authorization (The product does not perform an authorization check when an actor attempts to access a resource or perform an action.).
How can I check Packagist dependencies for CVE-2023-22489?
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-hph3-hv3c-7725",
  "modified" : "2023-01-10T22:28:19Z",
  "published" : "2023-01-10T22:28:19Z",
  "aliases" : [ "CVE-2023-22489" ],
  "summary" : "Any Flarum user including unactivated can reply in public discussions whose first post was permanently deleted",
  "details" : "If the first post of a discussion is permanently deleted but the discussion stays visible, any actor who can view the discussion is able to create a new reply via the REST API, no matter the reply permission or lock status.\n\nThis includes users that don't have a validated email.\n\nGuests cannot successfully create a reply because the API will fail with a 500 error when the user ID 0 is inserted into the database. This should also be fixed to return the expected 401/403 status.\n\nThis happens because when the first post of a discussion is permanently deleted, the `first_post_id` attribute of the discussion becomes `null` which causes access control to be skipped for all new replies.\n\nFlarum automatically makes discussions with zero comments invisible so an additional condition for this vulnerability is that the discussion must have at least one approved reply so that `discussions.comment_count` is still above zero after the post deletion.\n\n### Impact\nThis can open the discussion to uncontrolled spam or just unintentional replies if users still had their tab open before the vulnerable discussion was locked and then post a reply when they shouldn't be able to.\n\nIn combination with the email notification settings, this could also be used as a way to send unsolicited emails.\n\nVersions between `v1.3.0` and `v1.6.3` are impacted.\n\n### Patches\nThe vulnerability has been fixed and published as flarum/core v1.6.3. All communities running Flarum should upgrade as soon as possible to v1.6.3 using:\n\n```\ncomposer update --prefer-dist --no-dev -a -W\n```\nYou can then confirm you run the latest version using:\n\n```\ncomposer show flarum/core\n```\n\n### Workarounds\nIf you don't delete the first posts you are not affected. A workaround can be to delete the discussion itself, or amend the database to manually set a `first_post_id`.\n\n### For more information\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.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "flarum/core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.3.0"
      }, {
        "fixed" : "1.6.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/flarum/framework/security/advisories/GHSA-hph3-hv3c-7725"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-22489"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/flarum/framework/commit/12f14112a0ecd1484d97330b82beb2a145919015"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/flarum/framework"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/flarum/framework/releases/tag/v1.6.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-862" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-01-10T22:28:19Z",
    "nvd_published_at" : "2023-01-13T19:15:00Z"
  }
}