markdown-it@15.0.0

Markdown-it - modern pluggable markdown parser.

  • latest version

    15.0.3

  • latest non vulnerable version

  • first published

    11 years ago

  • latest version published

    25 days ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the markdown-it package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • H
    Inefficient Algorithmic Complexity

    markdown-it is a modern pluggable markdown parser.

    Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity in the reference block rule (src/rules_block/reference.ts) via parsing of reference labels. An attacker can supply input containing a long reference label, triggering quadratic time complexity during parsing and causing the process to hang.

    How to fix Inefficient Algorithmic Complexity?

    Upgrade markdown-it to version 15.0.3, 14.3.3 or higher.

    >=15.0.0 <15.0.3>=14.1.0 <14.3.3
    • H
    Unchecked Input for Loop Condition

    markdown-it is a modern pluggable markdown parser.

    Affected versions of this package are vulnerable to Unchecked Input for Loop Condition via the process_inlines function in src/rules_core/smartquotes.ts when the typographer option is enabled. The smartquotes rule performs a linear scan of the opener stack for every closing quote token, resulting in quadratic time complexity when quote types do not match. An attacker can supply input with a large number of unmatched quote characters to cause a crash through excessive CPU consumption.

    Note: This is only exploitable when the typographer: true option is explicitly set, as the default configuration (typographer: false) does not invoke the smartquotes rule.

    How to fix Unchecked Input for Loop Condition?

    Upgrade markdown-it to version 15.0.2, 14.3.2 or higher.

    >=15.0.0 <15.0.2<14.3.2
    • M
    Regular Expression Denial of Service (ReDoS)

    markdown-it is a modern pluggable markdown parser.

    Affected versions of this package are vulnerable to Regular Expression Denial of Service (ReDoS) via the inline HTML parsing rule in src/rules_inline/html_inline.ts, where the HTML_TAG_RE regular expression is applied against untrusted input. An attacker can supply input containing unclosed HTML special constructs (comments, processing instructions, declarations, or CDATA sections) to trigger quadratic backtracking, causing the parser to consume excessive CPU time and crash the process.

    Note: This is only exploitable when the html option is enabled, for example via the commonmark preset. The default configuration has HTML disabled and is unaffected.

    How to fix Regular Expression Denial of Service (ReDoS)?

    Upgrade markdown-it to version 14.3.3, 15.0.3 or higher.

    <14.3.3>=15.0.0 <15.0.3
    • M
    Inefficient Algorithmic Complexity

    markdown-it is a modern pluggable markdown parser.

    Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity in the linkify rule (src/rules_core/linkify.ts) via input containing multiple fuzzy links. The arrayReplaceAt utility was called repeatedly inside the token-processing loop, causing each replacement to copy the entire token array, resulting in O(n²) time complexity as the number of links grows. An attacker can trigger excessive CPU consumption by supplying input with a large number of linkified URLs.

    How to fix Inefficient Algorithmic Complexity?

    Upgrade markdown-it to version 14.3.1, 15.0.1 or higher.

    <14.3.1>=15.0.0 <15.0.1