CVE-2021-33829: Ckeditor4 Cross-Site Scripting Vulnerability
MODERATECVE-2021-33829 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Ckeditor4 libraries in the npm ecosystem. The issue involves ckeditor4 vulnerable to cross-site scripting. Remediation is available by upgrading affected packages to version 4.16.1, 7.80, 8.9.16, 9.0.14, 9.1.9.
CVE-2021-33829 at a Glance
Security Impact
CVSS: 6.1
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:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2021-33829
To remediate this vulnerability, upgrade all affected Ckeditor4 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 ckeditor4@4.16.1
Upgrade drupal/core to 7.80
Upgrade drupal/core to 8.9.16
Upgrade drupal/core to 9.0.14
Upgrade drupal/core to 9.1.9
Upgrade drupal/drupal to 7.80
Upgrade drupal/drupal to 8.9.16
Upgrade drupal/drupal to 9.0.14
Upgrade drupal/drupal to 9.1.9
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls ckeditor4
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2021-33829, inspect your project dependencies using npm:
npm ls ckeditor4
Analyze the terminal output to locate any version of Ckeditor4 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.16.1), your application is affected.
Note: The npm ls ckeditor4 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 Ckeditor4, 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-33829 Affected Ckeditor4 Versions
9 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ckeditor4
|
npm |
≥ 4.14.0
< 4.16.1
|
4.16.1
|
|
drupal/core
|
Packagist |
≥ 7.0.0
< 7.80
|
7.80
|
|
drupal/core
|
Packagist |
≥ 8.0.0
< 8.9.16
|
8.9.16
|
|
drupal/core
|
Packagist |
≥ 9.0.0
< 9.0.14
|
9.0.14
|
|
drupal/core
|
Packagist |
≥ 9.1.0
< 9.1.9
|
9.1.9
|
|
drupal/drupal
|
Packagist |
≥ 7.0.0
< 7.80
|
7.80
|
|
drupal/drupal
|
Packagist |
≥ 8.0.0
< 8.9.16
|
8.9.16
|
|
drupal/drupal
|
Packagist |
≥ 9.0.0
< 9.0.14
|
9.0.14
|
|
drupal/drupal
|
Packagist |
≥ 9.1.0
< 9.1.9
|
9.1.9
|
References
Frequently Asked Questions
What is CVE-2021-33829?
Which Ckeditor4 versions are affected?
What version fixes CVE-2021-33829?
Is ckeditor4 affected?
Is drupal/core affected?
What is the CVSS score of CVE-2021-33829?
What CWE is associated with CVE-2021-33829?
How can I check npm dependencies for CVE-2021-33829?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rgx6-rjj4-c388",
"modified" : "2024-02-08T09:40:35Z",
"published" : "2021-06-21T17:16:42Z",
"aliases" : [ "CVE-2021-33829" ],
"summary" : "ckeditor4 vulnerable to cross-site scripting",
"details" : "A cross-site scripting (XSS) vulnerability in the HTML Data Processor in CKEditor 4 4.14.0 through 4.16.x before 4.16.1 allows remote attackers to inject executable JavaScript code through a crafted comment because `--!>` is mishandled.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "ckeditor4"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.14.0"
}, {
"fixed" : "4.16.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "drupal/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.80"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "drupal/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0"
}, {
"fixed" : "8.9.16"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "drupal/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "9.0.0"
}, {
"fixed" : "9.0.14"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "drupal/core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "9.1.0"
}, {
"fixed" : "9.1.9"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "drupal/drupal"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "7.0.0"
}, {
"fixed" : "7.80"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "drupal/drupal"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "8.0.0"
}, {
"fixed" : "8.9.16"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "drupal/drupal"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "9.0.0"
}, {
"fixed" : "9.0.14"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "drupal/drupal"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "9.1.0"
}, {
"fixed" : "9.1.9"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-33829"
}, {
"type" : "WEB",
"url" : "https://ckeditor.com/blog/ckeditor-4.16.1-with-accessibility-enhancements/#improvements-for-comments-in-html-parser"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/drupal/core/CVE-2021-33829.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/drupal/drupal/CVE-2021-33829.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ckeditor/ckeditor4"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2021/11/msg00007.html"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NYA354LJP47KCVJMTUO77ZCX3ZK42G3T"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UVOYN2WKDPLKCNILIGEZM236ABQASLGW"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WAGNWHFIQAVCP537KFFS2A2GDG66J7XD"
}, {
"type" : "WEB",
"url" : "https://www.drupal.org/sa-core-2021-003"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/package/ckeditor4"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-06-14T17:22:32Z",
"nvd_published_at" : "2021-06-09T12:15:00Z"
}
}