CVE-2021-41165 HTML comments vulnerability allowing to execute JavaScript code
An attacker can execute JavaScript code by injecting malformed HTML comments that bypass content sanitization in CKEditor 4.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2021-41165?
CVE-2021-41165 is a high-severity cross-site scripting vulnerability in Drupal Drupal, published on 17 Nov 2021. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
CKEditor4 is an open source WYSIWYG HTML editor. In affected version a vulnerability has been discovered in the core HTML processing module and may affect all plugins used by CKEditor 4. The vulnerability allowed to inject malformed comments HTML bypassing content sanitization, which could result in executing JavaScript code. It affects all users using the CKEditor 4 at version < 4.17.0. The problem has been recognized and patched. The fix will be available in version 4.17.0.
Weakness: CWE-79
Which versions are affected by CVE-2021-41165?
5 open source packages ship an affected version, including drupal, ckeditor/ckeditor and ckeditor4. It affects 9 products.
| Package | Affected | Fixed in |
|---|---|---|
drupal Bitnami | From 8.9.0 | 8.9.20, 9.1.14, 9.2.9 |
ckeditor/ckeditor Packagist | All versions | 4.17.0 |
ckeditor/ckeditor Packagist | All versions | 4.17.0 |
ckeditor4 npm | All versions | 4.17.0 |
ckeditor4 npm | All versions | 4.17.0 |
Products include Ckeditor Ckeditor, Drupal Drupal, Oracle Agile Product Lifecycle Management, Oracle Application Express, Oracle Banking Apis, Oracle Banking Digital Experience and 3 more.
How do I fix CVE-2021-41165?
Upgrade drupal to a fixed version for your release line: 8.9.20, 9.1.14 or 9.2.9.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2021-41165 being exploited?
There is no known exploitation of CVE-2021-41165 in the wild and no public exploit code.
Other vulnerabilities in Drupal Drupal
- CVE-2023-31541 File upload in n/a
- CVE-2021-41164 Advanced Content Filter (ACF) vulnerability allowing to execute JavaScript code using malformed HTML
- CVE-2021-32808 Cross-site scripting in ckeditor via abuse of undo functionality
- CVE-2011-4972 Missing authorization in CKEditor Drupal module
- CVE-2021-37695 Execution of JavaScript code using malformed HTML in ckeditor
Sources
Also known as BIT-drupal-2021-41165, DEBIAN-CVE-2021-41165, GHSA-7h26-63m7-qhf2, UBUNTU-CVE-2021-41165.