CVE-2021-41086: Jsuites Cross-Site Scripting Vulnerability
HIGHCVE-2021-41086 is a HIGH (CVSS 8.7) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Jsuites libraries in the npm ecosystem. The issue involves clipboard-based xss. Remediation is available by upgrading affected packages to version 4.9.11.
CVE-2021-41086 at a Glance
Security Impact
CVSS: 8.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:R/S:C/C:H/I:H/A:N).
How to Fix CVE-2021-41086
To remediate this vulnerability, upgrade all affected Jsuites dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install jsuites@4.9.11
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls jsuites
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2021-41086, inspect your project dependencies using npm:
npm ls jsuites
Analyze the terminal output to locate any version of Jsuites in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.9.11), your application is affected.
Note: The npm ls jsuites command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
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 Jsuites, 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-41086 Affected Jsuites Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
jsuites
|
npm |
< 4.9.11
|
4.9.11
|
References
Frequently Asked Questions
What is CVE-2021-41086?
Which Jsuites versions are affected?
What version fixes CVE-2021-41086?
Is jsuites affected?
What is the CVSS score of CVE-2021-41086?
What CWE is associated with CVE-2021-41086?
How can I check npm dependencies for CVE-2021-41086?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qh7x-j4v8-qw5w",
"modified" : "2021-10-21T14:19:54Z",
"published" : "2021-09-22T20:39:26Z",
"aliases" : [ "CVE-2021-41086" ],
"summary" : "Clipboard-based XSS",
"details" : "### Impact\nXSS against the user.\n\n### Details\njsuites is vulnerable to DOM based XSS if the user can be tricked into copying _anything_ from a malicious and pasting it into the html editor. This is because a part of the clipboard content is directly written to `innerHTML` causing XSS.\n\n### References\nThe Curious Case of Copy & Paste – on risks of pasting arbitrary content in browsers: https://research.securitum.com/the-curious-case-of-copy-paste/\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "jsuites"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.9.11"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/jsuites/jsuites/security/advisories/GHSA-qh7x-j4v8-qw5w"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-41086"
}, {
"type" : "WEB",
"url" : "https://github.com/jsuites/jsuites/commit/d47a6f4e143188dde2742f4cffd313e1068ad3b3"
}, {
"type" : "WEB",
"url" : "https://github.com/jsuites/jsuites/commit/fe1d3cc5e339f2f4da8ed1f9f42271fdf9cbd8d2"
}, {
"type" : "WEB",
"url" : "https://github.com/jsuites/jsuites"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/package/jsuites"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-09-21T21:50:39Z",
"nvd_published_at" : "2021-09-21T21:15:00Z"
}
}