markdown-it 特定の入力で処理が極端に遅くなりサービス停止のおそれ
Summary
markdown-it の一部の版では、閉じられていないリンク参照定義を含む Markdown を処理すると、処理時間が入力長の二乗に比例して増える問題があります。既定の設定でも発生し、大量の入力でサービス拒否の状態を招くおそれがあります。影響を受けるのは 15.0.0 以上 15.0.3 未満で、15.0.3 以降に更新してください。
AI summary
Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.
markdown-it の一部の版では、閉じられていないリンク参照定義を含む Markdown を処理すると、処理時間が入力長の二乗に比例して増える問題があります。既定の設定でも発生し、大量の入力でサービス拒否の状態を招くおそれがあります。影響を受けるのは 15.0.0 以上 15.0.3 未満で、15.0.3 以降に更新してください。
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| npmmarkdown-it |
≥ 15.0.0, < 15.0.3→ 15.0.3 |
15.0.3 |
| markdown-itmarkdown-it | — | Not listed |
Fix status by distribution
Records published by each distribution for this CVE. Fixed versions differ by release; check each link.
- Ubuntu UBUNTU-CVE-2026-111758 node-markdown-it No fixed version in this record
Original description The description as published by the source.
markdown-it is a Markdown parser. From versions 14.1.0 to before 14.3.3, and 15.0.0 to before 15.0.3, a link reference definition whose label or title is never closed is O(n²) with default options. Continuation lines are pulled lazily with str += lineContent in src/rules_block/reference.ts, and the subsequent charCodeAt and slice calls flatten the V8 cons-string, copying everything collected so far; this runs before the rule decides the definition is invalid. No options are required to trigger it. This issue has been patched in versions 14.3.3 and 15.0.3.
Source: GitHub Security Advisories (Global) NVD GitHub Advisory
References
- advisory github.com
- advisory github.com
- advisory nvd.nist.gov
- package github.com
- patch github.com
- patch github.com
- REDHAT Red Hat
- web github.com
- web github.com
- web github.com