markdown-it linkify: true has two quadratic paths, so a few hundred KB of markdown blocks the event loop for tens of seconds
What to do
Vendor fix available. Upgrade each affected package to the fixed version on its release line (markdown-it 15.0.1, 14.3.1), redeploy, then verify what is actually installed.
This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.
Affected packages
npm markdown-it
- Affected
- >= 15.0.0, <= 15.0.0< 14.3.1
- Fixed in
- 15.0.1, 14.3.1
Sources
- GitHub Advisory Database and maintainer security advisories on GitHub
GitHub-reviewed advisory GHSA-253c-mchw-3w2r lists affected ranges: npm markdown-it >=15.0.0 =0 <14.3.1
VerifiedObserved Structured GitHub Advisory Database record (type=reviewed) from the GitHub REST API.
- Open Source Vulnerabilities (OSV.dev), including the GitHub Advisory Database
OSV record GHSA-253c-mchw-3w2r lists affected ranges: npm markdown-it >=15.0.0 =0 <14.3.1 (fixed)
VerifiedObserved Structured OSV record; GitHub-reviewed advisory.
Severity and exploitation
- Exploitation
- No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
- CVSS 4.0
- 6.3 · CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N · score source
- EPSS
- No dated EPSS signal available.
Source description
As published by the source; long descriptions are shortened.
Summary Two independent quadratic paths in the linkify: true handling. Both are in markdown-it's own code rather than in linkify-it, which stays linear on both payloads. src/rulescore/linkify.ts calls arrayReplaceAt once per linkified text token, and that rebuilds the whole children array each time. A paragraph of N soft-broken lines is one inline token with about 2N children, so you get N rebuilds over a 2N array. Schema-less emails are what reach it. A http:// link gets consumed by the inline rule first and never arrives as a text token, so those stay linear. src/rulesinline/linkify.ts runs state.pending.match(SCHEMERE) at every :// in the source. state.pending only gets truncated once a link is actually produced, so an unregistered scheme leaves it growing and every :// rescans the lot. Proof of concept Clean install of 15.0.0 from npm, new MarkdownIt({ linkify: true }).render(payload), Node 24. | N | 5,000 | 10,000 | 20,000 | 40,000 | |---|---|---|---|---| | 'a@b.co\n'.repeat(N),…
Dates and revisions
- Published by the source
- Last modified by the source
- Source last checked
- Revision 6 · amended ·
Amended from ghsa record GHSA-253c-mchw-3w2r
- Revision 5 · amended ·
Amended from ghsa record GHSA-253c-mchw-3w2r
- Revision 4 · amended ·
Amended from ghsa record GHSA-253c-mchw-3w2r
- Revision 3 · amended ·
Reviewed OSV alias/range/CVSS4 correction; package source scopes and original publication preserved. No customer finding resolved.
- Revision 2 · amended ·
Amended from osv record GHSA-253c-mchw-3w2r
- Revision 1 · created ·
Published from ghsa record GHSA-253c-mchw-3w2r
Agent brief
Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.
# Patch Next advisory brief: GHSA-253c-mchw-3w2r Advisory: markdown-it linkify: true has two quadratic paths, so a few hundred KB of markdown blocks the event loop for tens of seconds IDs: GHSA-253c-mchw-3w2r Record: https://patchnext.com/advisories/ghsa-253c-mchw-3w2r (revision 6, source checked 2 Nov 2026, 20:00 UTC) Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected. Severity: Medium (CVSS 6.3) Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV. Vendor response: Vendor fix available; fixed versions by package: markdown-it 15.0.1, 14.3.1. A vendor fix does not mean a deployment is fixed. ## Affected components - npm markdown-it: affected >= 15.0.0, <= 15.0.0; < 14.3.1; fixed in 15.0.1, 14.3.1 ## Suggested inspection (read-only) - `npm ls markdown-it --all`: lists every installed copy and version, including transitive ones. Run in the project root after `npm ci`. ## Supported action Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version. ## Required regression checks - Run the test suite and a production build. - Exercise the features that depend on markdown-it. - Repeat the inspection and confirm that only fixed versions remain installed. ## Rollback considerations - Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward. ## Unresolved questions - Which deployments run an affected version? - Exploitation status can change. Check again before lowering the priority. - Mark the work resolved only after the fixed version is verified in production. ## Sources - Verified: https://github.com/advisories/GHSA-253c-mchw-3w2r (GitHub-reviewed advisory GHSA-253c-mchw-3w2r lists affected ranges: npm markdown-it >=15.0.0 =0 <14.3.1) - Verified: https://osv.dev/vulnerability/GHSA-253c-mchw-3w2r (OSV record GHSA-253c-mchw-3w2r lists affected ranges: npm markdown-it >=15.0.0 =0 <14.3.1 (fixed)) Commands are suggestions: review each one before running it.
Loading voting…