Cross-site scripting in ckeditor via abuse of undo functionality
Description
ckeditor is an open source WYSIWYG HTML editor with rich content support. A vulnerability has been discovered in the clipboard Widget plugin if used alongside the undo feature. The vulnerability allows a user to abuse undo functionality using malformed widget HTML, which could result in executing JavaScript code. It affects all users using the CKEditor 4 plugins listed above at version >= 4.13.0. The problem has been recognized and patched. The fix will be available in version 4.16.2.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
A cross-site scripting (XSS) vulnerability in CKEditor 4's clipboard Widget plugin, combined with the undo feature, allows JavaScript execution via malformed widget HTML.
Vulnerability
The clipboard Widget plugin in CKEditor 4, when used alongside the undo feature, is vulnerable to stored cross-site scripting (XSS). The bug allows a user to abuse undo functionality by inserting malformed widget HTML, which can lead to JavaScript code execution. This affects all users using CKEditor 4 version >= 4.13.0 who have the clipboard Widget plugin enabled. The issue was identified and patched in version 4.16.2 [1][2][3].
Exploitation
An attacker needs to be able to provide malformed widget HTML to a CKEditor instance that has the clipboard Widget plugin enabled and the undo feature active. The attacker can craft a widget with specially malformed HTML that, when the undo operation is performed, triggers the execution of attacker-controlled JavaScript. The exploitation requires user interaction (e.g., pasting the malformed widget content) and the use of the undo feature [1].
Impact
Successful exploitation allows the attacker to execute arbitrary JavaScript in the context of the victim's CKEditor session. This can lead to data theft, session hijacking, or other client-side attacks depending on the application's trust in the editor [1].
Mitigation
The vulnerability is patched in CKEditor 4 version 4.16.2, released on August 18, 2021 [2][3]. Users should upgrade to at least this version. CKEditor 4 reached end of life on June 30, 2023, and the open-source version no longer receives security updates; commercial CKEditor 4 LTS provides extended support until December 2028 [1]. No workarounds have been published for unpatched versions beyond disabling the clipboard Widget plugin [1].
AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
ckeditor4npm | >= 4.13.0, < 4.16.2 | 4.16.2 |
Affected products
2- ckeditor/ckeditor4v5Range: >= 4.13.0, < 4.16.2
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
12- github.com/advisories/GHSA-6226-h7ff-ch6cghsaADVISORY
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NYA354LJP47KCVJMTUO77ZCX3ZK42G3T/mitrevendor-advisoryx_refsource_FEDORA
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UVOYN2WKDPLKCNILIGEZM236ABQASLGW/mitrevendor-advisoryx_refsource_FEDORA
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WAGNWHFIQAVCP537KFFS2A2GDG66J7XD/mitrevendor-advisoryx_refsource_FEDORA
- nvd.nist.gov/vuln/detail/CVE-2021-32808ghsaADVISORY
- github.com/ckeditor/ckeditor4/releases/tag/4.16.2ghsax_refsource_MISCWEB
- github.com/ckeditor/ckeditor4/security/advisories/GHSA-6226-h7ff-ch6cghsax_refsource_CONFIRMWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NYA354LJP47KCVJMTUO77ZCX3ZK42G3TghsaWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UVOYN2WKDPLKCNILIGEZM236ABQASLGWghsaWEB
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WAGNWHFIQAVCP537KFFS2A2GDG66J7XDghsaWEB
- www.oracle.com/security-alerts/cpujan2022.htmlghsax_refsource_MISCWEB
- www.oracle.com/security-alerts/cpuoct2021.htmlghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.