CVE-2022-41938: Flarum/core Cross Site Scripting Vulnerability With Vulnerability
CRITICALCVE-2022-41938 is a CRITICAL (CVSS 9.0) cross site scripting vulnerability with vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Flarum/core libraries in the Packagist ecosystem. The issue involves cross site scripting vulnerability with discussion titles. Remediation is available by upgrading affected packages to version 1.6.2.
CVE-2022-41938 at a Glance
Security Impact
CVSS: 9.0
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:C/C:H/I:H/A:H).
How to Fix CVE-2022-41938
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.
Upgrade flarum/core to 1.6.2
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-2022-41938, 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.2), 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-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. 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
CVE-2022-41938 Affected Flarum/core Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
flarum/core
|
Packagist |
≥ 1.5.0
< 1.6.2
|
1.6.2
|
References
Frequently Asked Questions
What is CVE-2022-41938?
Which Flarum/core versions are affected?
What version fixes CVE-2022-41938?
Is flarum/core affected?
What is the CVSS score of CVE-2022-41938?
What CWE is associated with CVE-2022-41938?
How can I check Packagist dependencies for CVE-2022-41938?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7x4w-j98p-854x",
"modified" : "2022-11-28T16:18:16Z",
"published" : "2022-11-21T23:53:32Z",
"aliases" : [ "CVE-2022-41938" ],
"summary" : "Cross site scripting vulnerability with discussion titles",
"details" : "Flarum's page title system allowed for page titles to be converted into HTML DOM nodes when pages were rendered. The change was made after `v1.5` and was not noticed.\n\nThis allowed an attacker to inject malicious HTML markup using a discussion title input, either by creating a new discussion or renaming one. The XSS attack occurs after a visitor opens the relevant discussion page.\n\n### Impact\nAll communities running Flarum from `v1.5.0` to `v1.6.1` are impacted.\n\n### Patches\nThe vulnerability has been fixed and published as flarum/core `v1.6.2`. All communities running Flarum from `v1.5.0` to `v1.6.1` have to upgrade as soon as possible to v1.6.2 using:\n\n```\ncomposer update --prefer-dist --no-dev -a -W\n```\n\nYou can then confirm you run the latest version using:\n\n```\ncomposer show flarum/core\n```\n\n### Workarounds\n**None**\n\n### For more information\nFor any questions or comments on this vulnerability please visit https://discuss.flarum.org/d/27558.\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:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "flarum/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.5.0"
}, {
"fixed" : "1.6.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/flarum/framework/security/advisories/GHSA-7x4w-j98p-854x"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-41938"
}, {
"type" : "WEB",
"url" : "https://github.com/flarum/framework/commit/690de9ce0ffe7ac4d45b73e303f44340c3433138"
}, {
"type" : "WEB",
"url" : "https://discuss.flarum.org/d/27558"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/flarum/framework"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-11-21T23:53:32Z",
"nvd_published_at" : "2022-11-19T01:15:00Z"
}
}