Junglewise Threat Intelligence

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

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

Vendors: CKEditor.

Executive brief

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.

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

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