CVE-2021-32671: Flarum/core Cross-Site Scripting Vulnerability
CRITICALCVE-2021-32671 is a CRITICAL (CVSS 10.0) cross-site scripting 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 xss vulnerability with translator. Remediation is available by upgrading affected packages to version 1.0.2.
CVE-2021-32671 at a Glance
Security Impact
CVSS: 10.0
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:N/S:C/C:H/I:H/A:H).
How to Fix CVE-2021-32671
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.0.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-2021-32671, 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.0.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-2021-32671 Affected Flarum/core Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
flarum/core
|
Packagist |
≥ 1.0.0
< 1.0.2
|
1.0.2
|
References
Frequently Asked Questions
What is CVE-2021-32671?
Which Flarum/core versions are affected?
What version fixes CVE-2021-32671?
Is flarum/core affected?
What is the CVSS score of CVE-2021-32671?
What CWE is associated with CVE-2021-32671?
How can I check Packagist dependencies for CVE-2021-32671?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5qjq-69w6-fg57",
"modified" : "2021-06-07T21:05:48Z",
"published" : "2021-06-07T21:48:17Z",
"aliases" : [ "CVE-2021-32671" ],
"summary" : "XSS vulnerability with translator",
"details" : "Flarum's translation system allowed for string inputs to be converted into HTML DOM nodes when rendered. This change was made after v0.1.0-beta.16 (our last beta before v1.0.0) and was not noticed or documented.\n\nThis allowed for any user to type malicious HTML markup within certain user input fields and have this execute on client browsers. The example which led to the discovery of this vulnerability was in the forum search box. Entering faux-malicious HTML markup, such as <script>alert('test')</script> resulted in an alert box appearing on the forum. This attack could also be modified to perform AJAX requests on behalf of a user, possibly deleting discussions, modifying their settings or profile, or even modifying settings on the Admin panel if the attack was targetted towards a privileged user.\n\n### Impact\n\nAll Flarum communities that run flarum v1.0.0 or v1.0.1 are impacted.\n\n### Patches\n\nThe vulnerability has been fixed and published as flarum/core v1.0.2. All communities running Flarum v1.0 have to upgrade as soon as possible to v1.0.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\n__None.__\n\n### For more information\n\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, and we will address it promptly.\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "flarum/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.0.0"
}, {
"fixed" : "1.0.2"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.0.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/flarum/core/security/advisories/GHSA-5qjq-69w6-fg57"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-32671"
}, {
"type" : "WEB",
"url" : "https://github.com/flarum/core/commit/440bed81b8019dff00642c8f493b4909d505a28a"
}, {
"type" : "WEB",
"url" : "https://packagist.org/packages/flarum/core"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2021-06-07T21:05:48Z",
"nvd_published_at" : "2021-06-07T22:15:00Z"
}
}