# CVE-2021-21391: CKEditor 5 ReDoS in multiple packages

Source: https://junglewise.ai/threats/cve-2021-21391-ckeditor-5-redos-in-multiple-packages  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2021-04-06. Updated: 2026-05-14  
License: CC BY 4.0 with a link back

CVE-2021-21391 · Severity: low · CVSS 3.1 · Published 2021-04-06

A performance vulnerability was found in several components of CKEditor 5, a popular text editor used in web applications. By providing specifically crafted content, an attacker can cause the user's browser tab to freeze or become unresponsive. This impacts the availability of the editor for end-users but does not directly expose sensitive data.

## Quick answers

**Is CVE-2021-21391 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2021-21391 being exploited in the wild.

**How severe is CVE-2021-21391?** Low severity, with a CVSS score of 3.1, published 6 April 2021.

**Which products and versions are affected?** CKEditor ckeditor5-engine <= 26.0.0; CKEditor ckeditor5-font <= 26.0.0; CKEditor ckeditor5-image <= 26.0.0; CKEditor ckeditor5-list <= 26.0.0; and 4 more.

**Is there a fix for CVE-2021-21391?** A patch was published on 2021-03-24: Version 27.0.0 released Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2021-21391 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2021-21391?** Check whether anything you run is named in the advisory. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

A Regular Expression Denial of Service (ReDoS) vulnerability exists in multiple CKEditor 5 npm packages due to inefficient regular expression processing. An attacker can exploit this by providing specially crafted input strings that trigger catastrophic backtracking in the regex engine. This results in uncontrolled resource consumption (CWE-400), leading to a significant performance drop and browser tab hangs. The vulnerability is reachable via the network and typically requires some form of user interaction, such as pasting or loading malicious content into the editor. Affected packages include engine, font, image, list, markdown-gfm, media-embed, paste-from-office, and widget. The issue is fixed in version 27.0.0.

## Affected products

- CKEditor ckeditor5-engine <= 26.0.0
- CKEditor ckeditor5-font <= 26.0.0
- CKEditor ckeditor5-image <= 26.0.0
- CKEditor ckeditor5-list <= 26.0.0
- CKEditor ckeditor5-markdown-gfm <= 26.0.0
- CKEditor ckeditor5-media-embed <= 26.0.0
- CKEditor ckeditor5-paste-from-office <= 26.0.0
- CKEditor ckeditor5-widget <= 26.0.0

## Identifiers

- CVE-2021-21391
- GHSA-3rh3-wfr4-76mj

## Timeline

- 2021-03-31: advisory: GitHub advisory published
- 2021-03-24: patched: Version 27.0.0 released
- 2021-04-29: disclosed: NVD publication date

## References

- [https://github.com/ckeditor/ckeditor5/security/advisories/GHSA-3rh3-wfr4-76mj](https://github.com/ckeditor/ckeditor5/security/advisories/GHSA-3rh3-wfr4-76mj)
- [https://github.com/ckeditor/ckeditor5/releases/tag/v27.0.0](https://github.com/ckeditor/ckeditor5/releases/tag/v27.0.0)
- [https://www.npmjs.com/package/@ckeditor/ckeditor5-engine](https://www.npmjs.com/package/@ckeditor/ckeditor5-engine)
- [https://www.npmjs.com/package/@ckeditor/ckeditor5-font](https://www.npmjs.com/package/@ckeditor/ckeditor5-font)
- [https://www.npmjs.com/package/@ckeditor/ckeditor5-image](https://www.npmjs.com/package/@ckeditor/ckeditor5-image)
- [https://www.npmjs.com/package/@ckeditor/ckeditor5-list](https://www.npmjs.com/package/@ckeditor/ckeditor5-list)
