CVE-2023-22487: Flarum/mentions Flarum Post Mentions Can Be Vulnerability
HIGHCVE-2023-22487 is a HIGH (CVSS 7.7) flarum post mentions can be vulnerability (CWE-284: Improper Access Control) affecting Flarum/mentions libraries in the Packagist ecosystem. The issue involves flarum post mentions can be used to read any post on the forum without access control. Remediation is available by upgrading affected packages to version 1.6.3.
CVE-2023-22487 at a Glance
Security Impact
CVSS: 7.7
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:N/S:C/C:H/I:N/A:N).
How to Fix CVE-2023-22487
To remediate this vulnerability, upgrade all affected Flarum/mentions dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade flarum/mentions to 1.6.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for flarum/mentions
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-22487, inspect your project dependencies for Flarum/mentions:
inspect dependencies for flarum/mentions
Analyze the terminal output to locate any version of Flarum/mentions 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-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In Flarum/mentions, 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
CVE-2023-22487 Affected Flarum/mentions Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
flarum/mentions
|
Packagist |
< 1.6.3
|
1.6.3
|
References
Frequently Asked Questions
What is CVE-2023-22487?
Which Flarum/mentions versions are affected?
What version fixes CVE-2023-22487?
Is flarum/mentions affected?
What is the CVSS score of CVE-2023-22487?
What CWE is associated with CVE-2023-22487?
How can I check Packagist dependencies for CVE-2023-22487?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-22m9-m3ww-53h3",
"modified" : "2023-01-19T21:31:41Z",
"published" : "2023-01-10T22:19:49Z",
"aliases" : [ "CVE-2023-22487" ],
"summary" : "Flarum post mentions can be used to read any post on the forum without access control",
"details" : "Using the mentions feature provided by the flarum/mentions extension, users can mention any post ID on the forum with the special `@\"<username>\"#p<id>` syntax.\n\nThe following behavior never changes no matter if the actor should be able to read the mentioned post or not:\n\nA URL to the mentioned post is inserted into the actor post HTML, leaking its discussion ID and post number.\n\nThe `mentionsPosts` relationship included in the `POST /api/posts` and `PATCH /api/posts/<id>` JSON responses leaks the full JSON:API payload of all mentioned posts without any access control. This includes the content, date, number and attributes added by other extensions.\n\nAn attacker only needs the ability to create new posts on the forum to exploit the vulnerability. This works even if new posts require approval. If they have the ability to edit posts, the attack can be performed even more discreetly by using a single post to scan any size of database and hiding the attack post content afterward.\n\n### Impact\nThe attack allows the leaking of all posts in the forum database, including posts awaiting approval, posts in tags the user has no access to, and private discussions created by other extensions like FriendsOfFlarum Byobu. This also includes non-comment posts like tag changes or renaming events. \n\nThe discussion payload is not leaked but using the mention HTML payload it's possible to extract the discussion ID of all posts and combine all posts back together into their original discussions even if the discussion title remains unknown.\n\nAll Flarum versions prior to `v1.6.3` are affected.\n\n### Patches\nThe vulnerability has been fixed and published as flarum/core v1.6.3. All communities running Flarum have to 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\nDisable the mentions extension.\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:N/S:C/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "flarum/mentions"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.6.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/flarum/framework/security/advisories/GHSA-22m9-m3ww-53h3"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-22487"
}, {
"type" : "WEB",
"url" : "https://github.com/flarum/framework/commit/ab1c868b978e8b0d09a5d682c54665dae17d0985"
}, {
"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-284" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-01-10T22:19:49Z",
"nvd_published_at" : "2023-01-11T20:15:00Z"
}
}