{"items":[{"id":"NVI-00018316","kind":"vulnerability","title":"markdown-it: Quadratic complexity DoS in smartquotes rule via replaceAt string operations","revision":1,"unknowns":["Customer inventory, deployment, reachability and exploitation have not been inspected."],"lifecycle":"active","identifiers":["GHSA-6v5v-wf23-fmfq","CVE-2026-48988"],"plain_summary":"GitHub lists this reviewed advisory for markdown-it. Published version ranges and source prerequisites are shown below; this is not an inspection of a visitor’s application.","review_status":"source_listed","control_topics":[],"public_actions":[{"summary":"Identify the exact component and deployed version, examine the linked publisher’s conditions, and retain evidence of any mitigation.","source_ids":["sr-0ecf8e5966847dd4508841381eec4584"],"action_type":"investigate","limitations":"Confirm current vendor support, compatibility and deployment evidence. This report has not tested a fix in your system.","current_supported_target":null}],"schema_version":"1.1.0","source_metrics":[{"kind":"CVSS","as_of":"2026-06-15T20:41:07.000Z","value":"5.3 medium","meaning":"GitHub source severity; exploitability and local consequence require separate evidence.","source_id":"sr-0ecf8e5966847dd4508841381eec4584"}],"why_it_matters":"Published affected context helps an owner decide what evidence to gather. This report has not examined your application.","related_sources":[{"id":"sr-0ecf8e5966847dd4508841381eec4584","url":"https://github.com/advisories/GHSA-6v5v-wf23-fmfq","basis":"vendor_advisory","notes":"GitHub Advisory Database; CC-BY-4.0. Each advisory links its original attribution. Null normalizes fields.","title":"GHSA-6v5v-wf23-fmfq","publisher":"GitHub Advisory Database","observed_at":"2026-11-06T07:20:20.042Z"}],"affected_context":[{"certainty":"source_listed","source_ids":["sr-0ecf8e5966847dd4508841381eec4584"],"technology":"markdown-it","known_exclusions":[],"conditions_summary":"### Summary\n\nA quadratic time complexity vulnerability exists in markdown-it's smartquotes rule (enabled via the `typographer: true` option). An attacker can craft a markdown input consisting of consecutive quotation marks that causes the parser to consume excessive CPU time, leading to denial of service.\n\n### Details\n\nThe vulnerability is in the `replaceAt()` helper function used by the smartquotes rule in `lib/rules_core/smartquotes.mjs`:\n\n```javascript\nfunction replaceAt (str, index, ch) {\n  return str.slice(0, index) + ch + str.slice(index + 1)\n}\n```\n\nWhen markdown-it processes a text token containing many quotation marks (either `\"` or `'`) with `typographer: true`, the smartquotes rule iterates through each quote character and calls `replaceAt()` to substitute it with a typographic (curly) quote. Each call to `replaceAt()` creates three new string slices and concatenates them, which is an O(n) operation where n is the length of the string.\n\nSince this is called once per quote character in the token, and there are n quote characters, the total time complexity becomes O(n^2).\n\nThe root cause is that the smartquotes rule modifies `token.content` in place using string slicing rat","public_affected_ranges":["<= 14.1.1"]}],"null_published_at":"2026-11-07T07:07:39.809Z","source_updated_at":"2026-06-15T20:41:07.000Z","source_disclosed_at":"2026-06-15T20:41:06.000Z","is_synthetic_fixture":false,"null_last_reviewed_at":null,"public_change_summary":"First indexed by Null; source disclosure date is shown separately.","null_first_observed_at":"2026-11-06T07:20:20.042Z"}],"next_cursor":null,"snapshot_revision":"42594"}