Vulnerabilities in pkg:npm/@ckeditor/ckeditor5-markdown-gfm
PACKAGECVE-2021-21254 is a MODERATE (CVSS 6.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting @ckeditor/ckeditor5 markdown gfm libraries in the npm ecosystem. The issue involves ckeditor 5 markdown plugin regular expression denial of service. Remediation is available by upgrading affected packages to version 25.0.0.
pkg:npm/@ckeditor/ckeditor5-markdown-gfm
Vulnerability advisories affecting package pkg:npm/@ckeditor/ckeditor5-markdown-gfm. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-hgmg-hhc8-g5wr | CVE-2021-21254 | MODERATE | CKEditor 5 Markdown plugin Regular expression Denial of Service |
| GHSA-42wq-rch8-6f6j | CVE-2022-31175 | MODERATE | CKEditor5 cross-site scripting vulnerability caused by the editor instance destroying process |
| GHSA-3rh3-wfr4-76mj | CVE-2021-21391 | MODERATE | Regular expression Denial of Service in multiple packages |
CVE-2021-21254 at a Glance
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:L/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2021-21254
To remediate this vulnerability, upgrade all affected @ckeditor/ckeditor5 markdown gfm dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install @ckeditor/ckeditor5-markdown-gfm@25.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @ckeditor/ckeditor5-markdown-gfm
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2021-21254, inspect your project dependencies using npm:
npm ls @ckeditor/ckeditor5-markdown-gfm
Analyze the terminal output to locate any version of @ckeditor/ckeditor5 markdown gfm in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 25.0.0), your application is affected.
Note: The npm ls @ckeditor/ckeditor5-markdown-gfm 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 markdown gfm, 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
CVE-2021-21254 Affected @ckeditor/ckeditor5 markdown gfm Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@ckeditor/ckeditor5-markdown-gfm
|
npm |
< 25.0.0
|
25.0.0
|
References
Frequently Asked Questions
What is CVE-2021-21254?
Which @ckeditor/ckeditor5 markdown gfm versions are affected?
What version fixes CVE-2021-21254?
Is @ckeditor/ckeditor5-markdown-gfm affected?
What is the CVSS score of CVE-2021-21254?
What CWE is associated with CVE-2021-21254?
How can I check npm dependencies for CVE-2021-21254?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hgmg-hhc8-g5wr",
"modified" : "2022-08-11T18:16:15Z",
"published" : "2021-01-29T21:51:22Z",
"aliases" : [ "CVE-2021-21254" ],
"summary" : "CKEditor 5 Markdown plugin Regular expression Denial of Service",
"details" : "### Impact\nA regular expression denial of service (ReDoS) vulnerability has been discovered in the CKEditor 5 Markdown plugin code. The vulnerability allowed to abuse a link recognition regular expression, which could cause a significant performance drop resulting in a browser tab freeze. It affects all users using the CKEditor 5 Markdown plugin at version <= 24.0.0. \n\n### Patches\nThe problem has been recognized and patched. The fix will be available in version 25.0.0.\n\n### Workarounds\nThe user can work around the issue by:\n- Upgrading CKEditor 5 to version 25.0.0.\n- Disabling the Markdown plugin.\n\n### More information\nIf you have any questions or comments about this advisory:\n* Email us at [security@cksource.com](mailto:security@cksource.com)\n\n### Acknowledgements\nThe CKEditor 5 team would like to thank Erik Krogh Kristensen from the GitHub team for recognizing this vulnerability and \nAlvaro Muñoz from GitHub for reporting it.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@ckeditor/ckeditor5-markdown-gfm"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "25.0.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 24.0.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ckeditor/ckeditor5/security/advisories/GHSA-hgmg-hhc8-g5wr"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-21254"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ckeditor/ckeditor5"
}, {
"type" : "WEB",
"url" : "https://github.com/ckeditor/ckeditor5/releases/tag/v25.0.0"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/package/@ckeditor/ckeditor5-markdown-gfm"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-01-29T21:50:43Z",
"nvd_published_at" : "2021-01-29T22:15:00Z"
}
}