mistune@2.1.0

A sane and fast Markdown parser with useful plugins and renderers

  • latest version

    3.3.4

  • latest non vulnerable version

  • first published

    12 years ago

  • latest version published

    17 days ago

  • licenses detected

  • Direct Vulnerabilities

    Known vulnerabilities in the mistune 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
    • M
    Cross-site Scripting (XSS)

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS) via the safe_url process. An attacker can inject malicious URLs into rendered href and src attributes by crafting links that use legacy or chained schemes, potentially leading to script execution in affected user agents.

    How to fix Cross-site Scripting (XSS)?

    Upgrade mistune to version 3.3.0 or higher.

    [,3.3.0)
    • M
    Insufficient Verification of Data Authenticity

    Affected versions of this package are vulnerable to Insufficient Verification of Data Authenticity via the toc process. An attacker can interfere with same-page navigation, CSS selectors, or JavaScript handlers by creating content with predictable id attributes that collide with automatically generated heading anchors.

    How to fix Insufficient Verification of Data Authenticity?

    Upgrade mistune to version 3.3.0 or higher.

    [,3.3.0)
    • H
    Inefficient Algorithmic Complexity

    Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity in the inline_parser process. An attacker can cause excessive resource consumption by submitting input containing long sequences of double-asterisk or triple-asterisk emphasis pairs, leading to significant performance degradation.

    How to fix Inefficient Algorithmic Complexity?

    Upgrade mistune to version 3.3.0 or higher.

    [,3.3.0)
    • M
    Uncontrolled Recursion

    Affected versions of this package are vulnerable to Uncontrolled Recursion through the include process. An attacker can cause the application to crash by creating two markdown files that recursively include each other, leading to unbounded recursion and a RecursionError.

    How to fix Uncontrolled Recursion?

    Upgrade mistune to version 3.3.0 or higher.

    [,3.3.0)
    • H
    Inefficient Algorithmic Complexity

    Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity through the parsing process in formatting.py when handling long sequences of ~~, ==, or ^^ markers. An attacker can cause excessive CPU consumption by submitting specially crafted input containing long runs of these markers.

    How to fix Inefficient Algorithmic Complexity?

    Upgrade mistune to version 3.3.0 or higher.

    [,3.3.0)
    • M
    Cross-site Scripting (XSS)

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS) via the render_admonition function. An attacker can execute arbitrary scripts in the context of the user by injecting malicious content into the :class: option of the Admonition directive, which is not properly escaped before being included in the HTML output.

    How to fix Cross-site Scripting (XSS)?

    Upgrade mistune to version 3.2.1 or higher.

    [,3.2.1)
    • M
    Cross-site Scripting (XSS)

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS) via the safe_url function. An attacker can execute arbitrary scripts in the rendered HTML by supplying specially crafted percent-encoded javascript URIs in Markdown links or images.

    How to fix Cross-site Scripting (XSS)?

    Upgrade mistune to version 3.3.0 or higher.

    [,3.3.0)
    • H
    Inefficient Algorithmic Complexity

    Affected versions of this package are vulnerable to Inefficient Algorithmic Complexity via the block_parser process. An attacker can cause excessive CPU consumption by submitting specially crafted Markdown documents containing numerous repeated or distinct reference-link definitions.

    How to fix Inefficient Algorithmic Complexity?

    Upgrade mistune to version 3.3.0 or higher.

    [,3.3.0)
    • H
    Directory Traversal

    Affected versions of this package are vulnerable to Directory Traversal via the Include.parse process. An attacker can access arbitrary files outside the intended markdown directory by supplying crafted include paths when markdown files are processed using md.read.

    How to fix Directory Traversal?

    Upgrade mistune to version 3.3.0 or higher.

    [,3.3.0)
    • M
    Allocation of Resources Without Limits or Throttling

    Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling in the parse_link_text function of mistune/inline_parser.py, which performs a regex search inside a loop that advances one character at a time when parsing fails, producing O(n²) behavior. An attacker can exhaust CPU and cause denial of service by submitting a small Markdown payload of consecutive [ characters, around 6 KB, to any path that parses it, with no authentication required. Exploitation depends only on the application parsing untrusted Markdown.

    How to fix Allocation of Resources Without Limits or Throttling?

    Upgrade mistune to version 3.3.0 or higher.

    [,3.3.0)
    • M
    Cross-site Scripting (XSS)

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS) in the render_block_image function. An attacker can inject arbitrary CSS into the style attribute of an image element by supplying a crafted value to the :width: or :height: option, which is insufficiently validated and allows additional CSS properties to be appended. This can result in the creation of deceptive overlays that obscure legitimate content, potentially enabling phishing, UI redressing, or data exfiltration attacks.

    How to fix Cross-site Scripting (XSS)?

    Upgrade mistune to version 3.2.1 or higher.

    [,3.2.1)
    • M
    Cross-site Scripting (XSS)

    Affected versions of this package are vulnerable to Cross-site Scripting (XSS) in the render_toc_ul function. An attacker can execute arbitrary JavaScript in the context of the rendered page by injecting malicious input into heading text, which is then used unescaped as an anchor ID and label in generated HTML. This allows exfiltration of session data, manipulation of the DOM, or phishing attacks when a crafted heading is processed.

    How to fix Cross-site Scripting (XSS)?

    Upgrade mistune to version 3.2.1 or higher.

    [,3.2.1)