CKEditor 4: Cross-Site Scripting Vulnerability in AJAX Sample

ckeditor4 Updated 02 Oct 2025

Summary

07/02/2024
Yes i
Moderate
6.1

CVE-2023-4771: CKEditor cross-site scripting vulnerability in AJAX sample. Affects ckeditor4 versions < 4.24.0-lts. Fixed in 4.24.0-lts. How to fix ↓

Also tracked for

The same CVE-2023-4771 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

CKEditor 4 is an open-source rich text editor used for web content creation. It provides users with a wide range of features and customization options. The AJAX sample, located at samples/old/ajax.html, is one of the samples shipped with CKEditor 4. It demonstrates the integration of CKEditor with AJAX functionality. Unfortunately, this sample contains a vulnerability that allows for cross-site scripting (XSS) attacks.

Vulnerability Detail

The CKEditor 4 AJAX sample is susceptible to a cross-site scripting (XSS) vulnerability. This vulnerability enables an attacker to execute arbitrary JavaScript code by exploiting the AJAX sample. It affects all users utilizing CKEditor 4 versions prior to 4.24.0-lts, where the samples/old/ajax.html file is used in a production environment. The impact of this vulnerability can be significant, as it allows an attacker to manipulate the behavior of the CKEditor instance and potentially compromise user data or perform unauthorized actions.

How To Fix

Latest published version: 4.25.2 as of 22 Oct 2026

npm install ckeditor4@4.25.2

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

4.24.0-lts

This is the first release that contains the fix.

npm install ckeditor4@4.24.0-lts

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If an immediate update to CKEditor 4 version 4.24.0-lts is not feasible, a temporary workaround is to remove or disable the vulnerable AJAX sample (samples/old/ajax.html) from the production code. By eliminating the usage of this sample, the risk of exploitation can be mitigated. However, it is strongly advised to apply the official patch by updating to the latest version as soon as possible.

Conclusion

The CKEditor 4 AJAX sample contains a cross-site scripting (XSS) vulnerability that can be exploited by attackers to execute arbitrary JavaScript code. To address this issue, it is crucial to update CKEditor 4 to version 4.24.0-lts or later and replace the vulnerable AJAX sample with the patched version. Following secure coding practices and input sanitization is also essential to prevent XSS attacks. For further assistance or information on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for ckeditor4 →

Share this vulnerability

FAQ

CKEditor 4 is a popular open-source rich text editor used for web content creation. It offers a wide range of features and is highly customizable.

The AJAX sample in CKEditor 4 is a demonstration of how to integrate CKEditor with AJAX functionality. It showcases the usage of AJAX to load and save content within the editor.

Cross-site scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users. It can lead to various consequences, such as data theft, session hijacking, or defacement of websites.

The CKEditor 4 XSS vulnerability can be exploited by an attacker who can manipulate the AJAX sample. By injecting malicious JavaScript code through the vulnerable sample, the attacker can execute arbitrary scripts within the context of the affected user's browser.

Yes, a fix has been developed for the CKEditor 4 XSS vulnerability. It is recommended to update CKEditor 4 to version 4.24.0-lts or later, which includes the necessary patch to mitigate the vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for ckeditor4.

How To Fix

Latest published version: 4.25.2 as of 22 Oct 2026

npm install ckeditor4@4.25.2

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

4.24.0-lts

This is the first release that contains the fix.

npm install ckeditor4@4.24.0-lts

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback