p PatchFirst

CVE-2026-48988

CVE-2026-48988 · markdown-it: Quadratic complexity DoS in smartquotes rule via replaceAt string operations

This page contains facts from public vulnerability sources. Check the original advisory before updating.

markdown-it is a Markdown parser. Versions 14.1.1 and below contain a denial-of-service vulnerability when typographer: true is enabled, due to quadratic (O(n^2)) processing in the smartquotes rule. The issue stems from repeatedly modifying strings with replaceAt(), which performs O(n) slicing and concatenation per quote character. This can cause excessive CPU consumption when parsing quote-heavy, user-supplied markdown and may let attackers degrade or disrupt service availability. Although typographer is disabled by default, many production apps enable it for smart typography, making the issue relevant. This issue has been fixed in version 14.2.0.

CVSS 5.3 · Medium · EPSS 0.4% · Fix available

Published
Updated

Stack: system · node

Affected products and versions

  • markdown-it

    Versions
    • < 14.2.0: Affected

    No fix published

  • node-markdown-it Debian:12

    Versions
    • 22.2.3+dfsg+~12.2.3-2
    • 22.2.3+dfsg+~12.2.3-3
    • 22.2.3+dfsg+~12.2.3-4
    • 22.2.3+dfsg+~12.2.3-5
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • node-markdown-it Debian:13

    Versions
    • 22.2.3+dfsg+~12.2.3-2
    • 22.2.3+dfsg+~12.2.3-3
    • 22.2.3+dfsg+~12.2.3-4
    • 22.2.3+dfsg+~12.2.3-5
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • node-markdown-it Debian:14

    Versions
    • 22.2.3+dfsg+~12.2.3-2
    • 22.2.3+dfsg+~12.2.3-3
    • 22.2.3+dfsg+~12.2.3-4
    Affected ranges
    • ECOSYSTEM: < 22.2.3+dfsg+~12.2.3-5

    Update to 22.2.3+dfsg+~12.2.3-5

  • markdown-it npm

    Affected ranges
    • SEMVER: < 14.2.0

    Update to 14.2.0

  • node-markdown-it Ubuntu:22.04:LTS

    Versions
    • 10.0.0+dfsg-2
    • 10.0.0+dfsg-3
    • 10.0.0+dfsg-3.1
    • 10.0.0+dfsg-4
    • 10.0.0+dfsg-5
    • 10.0.0+dfsg-6
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • node-markdown-it Ubuntu:24.04:LTS

    Versions
    • 22.2.3+dfsg+~12.2.3-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • node-markdown-it Ubuntu:25.10

    Versions
    • 22.2.3+dfsg+~12.2.3-2
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • node-markdown-it Ubuntu:26.10

    Versions
    • 22.2.3+dfsg+~12.2.3-4
    • 22.2.3+dfsg+~12.2.3-5
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

  • node-markdown-it Ubuntu:26.04:LTS

    Versions
    • 22.2.3+dfsg+~12.2.3-2
    • 22.2.3+dfsg+~12.2.3-4
    Affected ranges
    • ECOSYSTEM: (−∞, +∞)

    No fix published

Original sources

Check your server →