Vulnerabilities in pkg:npm/@ckeditor/ckeditor5-font

PACKAGE
Advisory Identifier: GHSA-3rh3-wfr4-76mj
Advisory Summary

CVE-2021-21391 is a MODERATE (CVSS 6.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting @ckeditor/ckeditor5 engine libraries in the npm ecosystem. The issue involves regular expression denial of service in multiple packages. Remediation is available by upgrading affected packages to version 27.0.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@ckeditor/ckeditor5-font

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@ckeditor/ckeditor5-font. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-3rh3-wfr4-76mj CVE-2021-21391 MODERATE Regular expression Denial of Service in multiple packages

CVE-2021-21391 at a Glance

CVE Identifier CVE-2021-21391
GHSA Identifier GHSA-3rh3-wfr4-76mj
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product @ckeditor/ckeditor5 engine
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2021-21391

To remediate this vulnerability, upgrade all affected @ckeditor/ckeditor5 engine dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@ckeditor/ckeditor5-engine fixed: 27.0.0
npm install @ckeditor/ckeditor5-engine@27.0.0
@ckeditor/ckeditor5-font fixed: 27.0.0
npm install @ckeditor/ckeditor5-font@27.0.0
@ckeditor/ckeditor5-image fixed: 27.0.0
npm install @ckeditor/ckeditor5-image@27.0.0
@ckeditor/ckeditor5-list fixed: 27.0.0
npm install @ckeditor/ckeditor5-list@27.0.0
@ckeditor/ckeditor5-markdown-gfm fixed: 27.0.0
npm install @ckeditor/ckeditor5-markdown-gfm@27.0.0
@ckeditor/ckeditor5-media-embed fixed: 27.0.0
npm install @ckeditor/ckeditor5-media-embed@27.0.0
@ckeditor/ckeditor5-paste-from-office fixed: 27.0.0
npm install @ckeditor/ckeditor5-paste-from-office@27.0.0
@ckeditor/ckeditor5-widget fixed: 27.0.0
npm install @ckeditor/ckeditor5-widget@27.0.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @ckeditor/ckeditor5-engine

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2021-21391, inspect your project dependencies using npm:

npm ls @ckeditor/ckeditor5-engine

Analyze the terminal output to locate any version of @ckeditor/ckeditor5 engine in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 27.0.0), your application is affected.

Note: The npm ls @ckeditor/ckeditor5-engine command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In @ckeditor/ckeditor5 engine, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact 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. ### Patches The problem has been recognized and patched. The fix will be available in version 27.0.0. ### For more information Email us at security@cksource.com if you have any questions or comments about this advisory. ### Acknowledgements The CKEditor 5 team would like to thank Yeting Li for recognizing and reporting these vulnerabilities.

CVE-2021-21391 Affected @ckeditor/ckeditor5 engine Versions

8 component(s)
Fixed Versions:
27.0.0
Product / Package Ecosystem Affected Versions Fixed Version
@ckeditor/ckeditor5-engine
npm
< 27.0.0
27.0.0
@ckeditor/ckeditor5-font
npm
< 27.0.0
27.0.0
@ckeditor/ckeditor5-image
npm
< 27.0.0
27.0.0
@ckeditor/ckeditor5-list
npm
< 27.0.0
27.0.0
@ckeditor/ckeditor5-markdown-gfm
npm
< 27.0.0
27.0.0
@ckeditor/ckeditor5-media-embed
npm
< 27.0.0
27.0.0
@ckeditor/ckeditor5-paste-from-office
npm
< 27.0.0
27.0.0
@ckeditor/ckeditor5-widget
npm
< 27.0.0
27.0.0

References

Frequently Asked Questions

What is CVE-2021-21391?
CVE-2021-21391 is a security vulnerability in @ckeditor/ckeditor5 engine involving Regular expression Denial of Service in multiple packages under CWE-400: Uncontrolled Resource Consumption.
Which @ckeditor/ckeditor5 engine versions are affected?
Affected versions include releases prior to 27.0.0 across affected packages: @ckeditor/ckeditor5-engine, @ckeditor/ckeditor5-font, @ckeditor/ckeditor5-image, @ckeditor/ckeditor5-list, @ckeditor/ckeditor5-markdown-gfm, @ckeditor/ckeditor5-media-embed, @ckeditor/ckeditor5-paste-from-office, @ckeditor/ckeditor5-widget.
What version fixes CVE-2021-21391?
Upgrading to 27.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @ckeditor/ckeditor5-engine affected?
Yes, @ckeditor/ckeditor5-engine is affected in releases prior to 27.0.0. Upgrade your dependency to 27.0.0 or later.
Is @ckeditor/ckeditor5-font affected?
Yes, @ckeditor/ckeditor5-font is affected in releases prior to 27.0.0. Upgrade your dependency to 27.0.0 or later.
What is the CVSS score of CVE-2021-21391?
CVE-2021-21391 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2021-21391?
CVE-2021-21391 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check npm dependencies for CVE-2021-21391?
Run the dependency tree command: 'npm ls @ckeditor/ckeditor5-engine'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-3rh3-wfr4-76mj",
  "modified" : "2021-04-30T17:30:42Z",
  "published" : "2021-04-06T17:28:41Z",
  "aliases" : [ "CVE-2021-21391" ],
  "summary" : "Regular expression Denial of Service in multiple packages",
  "details" : "\n### Impact\nA 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.\n\n### Patches\nThe problem has been recognized and patched. The fix will be available in version 27.0.0.\n\n### For more information\nEmail us at security@cksource.com if you have any questions or comments about this advisory.\n\n### Acknowledgements\nThe CKEditor 5 team would like to thank Yeting Li for recognizing and reporting these vulnerabilities.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@ckeditor/ckeditor5-engine"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "27.0.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 26.0.0"
    }
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@ckeditor/ckeditor5-font"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "27.0.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 26.0.0"
    }
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@ckeditor/ckeditor5-image"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "27.0.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 26.0.0"
    }
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@ckeditor/ckeditor5-list"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "27.0.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 26.0.0"
    }
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@ckeditor/ckeditor5-markdown-gfm"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "27.0.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 26.0.0"
    }
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@ckeditor/ckeditor5-media-embed"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "27.0.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 26.0.0"
    }
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@ckeditor/ckeditor5-paste-from-office"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "27.0.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 26.0.0"
    }
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@ckeditor/ckeditor5-widget"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "27.0.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 26.0.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ckeditor/ckeditor5/security/advisories/GHSA-3rh3-wfr4-76mj"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-21391"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ckeditor/ckeditor5/releases/tag/v27.0.0"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/package/@ckeditor/ckeditor5-engine"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/package/@ckeditor/ckeditor5-font"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/package/@ckeditor/ckeditor5-image"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/package/@ckeditor/ckeditor5-list"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/package/@ckeditor/ckeditor5-markdown-gfm"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/package/@ckeditor/ckeditor5-media-embed"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/package/@ckeditor/ckeditor5-paste-from-office"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/package/@ckeditor/ckeditor5-widget"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-03-31T18:37:46Z",
    "nvd_published_at" : "2021-04-29T01:15:00Z"
  }
}