CVE-2021-26271: CKEditor 4 regular expression denial of service

CVE-2021-26271 · Severity: low · CVSS 3.1 · Published 2022-05-24

CKEditor 4 is a widely-used rich text editor embedded in web applications to allow users to compose formatted content. An attacker can trigger a denial-of-service condition by convincing a user to paste specially crafted text into the Styles input field within specific dialogs, causing the application to become unresponsive due to excessive processing time.

Technologies: CKEditor 4. Vendors: CKEditor, npm.

Quick answers

Is CVE-2021-26271 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2021-26271 being exploited in the wild.
How severe is CVE-2021-26271?
Low severity, with a CVSS score of 3.1, published 24 May 2022.
Which products and versions are affected?
CKEditor 4 before 4.16; ckeditor4-dev (npm) ECOSYSTEM:introduced=0,fixed=4.16.
Is there a fix for CVE-2021-26271?
Yes. ckeditor4-dev (npm): upgrade to 4.16 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2021-26271 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2021-26271?
Check whether you run CKEditor 4 or ckeditor4-dev (npm) at an affected version. 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.

How to fix

  • ckeditor4-dev (npm): upgrade to 4.16 or later
    npm install ckeditor4-dev@4.16

Technical details

CKEditor 4 versions before 4.16 are vulnerable to a regular expression denial of service (ReDoS) attack. The vulnerability exists in the Styles input validation logic of the Advanced Tab in the Dialogs plugin, where a vulnerable regex pattern fails to handle crafted input efficiently. An attacker exploiting this would need to trick a user into pasting malicious text into the affected dialog field. Successful exploitation causes the regex engine to enter catastrophic backtracking, consuming CPU resources and making the editor (and potentially the entire page) unresponsive. The issue is fixed in CKEditor 4.16 and later versions.

Affected products

  • CKEditor CKEditor 4 before 4.16

Identifiers

  • CVE-2021-26271
  • GHSA-jv4c-7jqq-m34x

Timeline

  • 2021-01-26: disclosed
  • 2021: patched: Fixed in CKEditor 4.16

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.