CVE-2024-45613: Ckeditor5 Cross-Site Scripting Vulnerability
MODERATECVE-2024-45613 is a MODERATE (CVSS 7.2) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Ckeditor5 libraries in the npm ecosystem. The issue involves cross-site scripting (xss) in the clipboard package. Remediation is available by upgrading affected packages to version 43.1.1.
CVE-2024-45613 at a Glance
Security Impact
CVSS: 7.2
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:L/I:L/A:N).
How to Fix CVE-2024-45613
To remediate this vulnerability, upgrade all affected Ckeditor5 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 ckeditor5@43.1.1
npm install @ckeditor/ckeditor5-clipboard@43.1.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls ckeditor5
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2024-45613, inspect your project dependencies using npm:
npm ls ckeditor5
Analyze the terminal output to locate any version of Ckeditor5 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 43.1.1), your application is affected.
Note: The npm ls ckeditor5 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 Ckeditor5, 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-2024-45613 Affected Ckeditor5 Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ckeditor5
|
npm |
≥ 40.0.0
< 43.1.1
|
43.1.1
|
|
@ckeditor/ckeditor5-clipboard
|
npm |
≥ 40.0.0
< 43.1.1
|
43.1.1
|
References
Frequently Asked Questions
What is CVE-2024-45613?
Which Ckeditor5 versions are affected?
What version fixes CVE-2024-45613?
Is ckeditor5 affected?
Is @ckeditor/ckeditor5-clipboard affected?
What is the CVSS score of CVE-2024-45613?
What CWE is associated with CVE-2024-45613?
How can I check npm dependencies for CVE-2024-45613?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rgg8-g5x8-wr9v",
"modified" : "2024-10-15T17:29:14Z",
"published" : "2024-09-25T18:13:35Z",
"aliases" : [ "CVE-2024-45613" ],
"summary" : "Cross-site scripting (XSS) in the clipboard package",
"details" : "### Impact\nDuring a recent internal audit, we identified a Cross-Site Scripting (XSS) vulnerability in the CKEditor 5 clipboard package. This vulnerability could be triggered by a specific user action, leading to unauthorized JavaScript code execution, if the attacker managed to insert a malicious content into the editor, which might happen with a very specific editor configuration.\n\nThis vulnerability affects **only** installations where the editor configuration meets the following criteria:\n\n1. The [**Block Toolbar**](https://ckeditor.com/docs/ckeditor5/latest/getting-started/setup/toolbar.html#block-toolbar) plugin is enabled.\n1. One of the following plugins is also enabled:\n - [**General HTML Support**](https://ckeditor.com/docs/ckeditor5/latest/features/html/general-html-support.html) with a configuration that permits unsafe markup.\n - [**HTML Embed**](https://ckeditor.com/docs/ckeditor5/latest/features/html/html-embed.html).\n\n### Patches\nThe problem has been recognized and patched. The fix will be available in version 43.1.1 (and above), and explicitly in version 41.3.2.\n\n### Workarounds\nIt's highly recommended to update to the version 43.1.1 or higher. However, if the update is not an option, we recommend disabling the block toolbar plugin.\n\n### For more information\nEmail us at [security@cksource.com](mailto:security@cksource.com) if you have any questions or comments about this advisory.\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "ckeditor5"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "40.0.0"
}, {
"fixed" : "43.1.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@ckeditor/ckeditor5-clipboard"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "40.0.0"
}, {
"fixed" : "43.1.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ckeditor/ckeditor5/security/advisories/GHSA-rgg8-g5x8-wr9v"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-45613"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ckeditor/ckeditor5"
}, {
"type" : "WEB",
"url" : "https://github.com/ckeditor/ckeditor5/releases/tag/v43.1.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-09-25T18:13:35Z",
"nvd_published_at" : "2024-09-25T14:15:05Z"
}
}