CVE-2024-45613: Ckeditor5 Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-rgg8-g5x8-wr9v
CVSS 7.2
CWE-79
Published
Advisory Summary

CVE-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

CVE Identifier CVE-2024-45613
GHSA Identifier GHSA-rgg8-g5x8-wr9v
Severity MODERATE
CVSS v3.1 Base Score 7.2
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Ckeditor5
Package Ecosystem npm
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (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.

ckeditor5 fixed: 43.1.1
npm install ckeditor5@43.1.1
@ckeditor/ckeditor5-clipboard fixed: 43.1.1
npm install @ckeditor/ckeditor5-clipboard@43.1.1
Verify Direct and Transitive Dependencies

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

### Impact During 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. This vulnerability affects **only** installations where the editor configuration meets the following criteria: 1. The [**Block Toolbar**](https://ckeditor.com/docs/ckeditor5/latest/getting-started/setup/toolbar.html#block-toolbar) plugin is enabled. 1. One of the following plugins is also enabled: - [**General HTML Support**](https://ckeditor.com/docs/ckeditor5/latest/features/html/general-html-support.html) with a configuration that permits unsafe markup. - [**HTML Embed**](https://ckeditor.com/docs/ckeditor5/latest/features/html/html-embed.html). ### Patches The 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. ### Workarounds It'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. ### For more information Email us at [security@cksource.com](mailto:security@cksource.com) if you have any questions or comments about this advisory.

CVE-2024-45613 Affected Ckeditor5 Versions

2 component(s)
Fixed Versions:
43.1.1
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?
CVE-2024-45613 is a security vulnerability in Ckeditor5 involving Cross-site scripting (XSS) in the clipboard package under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Ckeditor5 versions are affected?
Affected versions include releases prior to 43.1.1 across affected packages: ckeditor5, @ckeditor/ckeditor5-clipboard.
What version fixes CVE-2024-45613?
Upgrading to 43.1.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is ckeditor5 affected?
Yes, ckeditor5 is affected in releases prior to 43.1.1. Upgrade your dependency to 43.1.1 or later.
Is @ckeditor/ckeditor5-clipboard affected?
Yes, @ckeditor/ckeditor5-clipboard is affected in releases prior to 43.1.1. Upgrade your dependency to 43.1.1 or later.
What is the CVSS score of CVE-2024-45613?
CVE-2024-45613 has a CVSS v3.1 base score of 7.2 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2024-45613?
CVE-2024-45613 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (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.).
How can I check npm dependencies for CVE-2024-45613?
Run the dependency tree command: 'npm ls ckeditor5'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}