Skip to content

← Public intelligence

crates.io package

comrak

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

5 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Medium, CVSS 5.3crates.ioPublished

    Comrak AST node data is not validated (GHSL-2023-049)

    CVE-2023-28631 · GHSA-5r3x-p7xx-x6q5

    Affected
    • crates.io comrak < 0.17.0
    Fixed in
    0.17.0· Vendor fix available
    Issue
    Impact A Comrak AST can be constructed manually by a program instead of parsing a Markdown document with parsedocument. This AST can then be converted to HTML via html::formatdocumentwithplugins. However, the HTML formatting code assumes that the AST is well-formed. For example, many AST notes contain [u8] fields which the formatting code assumes is valid UTF-8 data. Several bugs can be triggered if this is not the case. Patches 0.17.0 contains adjustments to the AST, storing strings instead of unvalidated byte arrays. Workarounds Validate UTF-8 correctness of all data when assigning to &[u8] and Vec<u8 fields in the AST. References n/a

    Recommended action: Upgrade to 0.17.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  2. Medium, CVSS 5.3crates.ioPublished

    Comrak vulnerable to production of excessive output when parsing Markdown (GHSL-2023-048)

    GHSA-xxmq-4vph-956w

    Affected
    • crates.io comrak < 0.17.0
    Fixed in
    0.17.0· Vendor fix available
    Issue
    Impact comrak is vulnerable to the upstream cmark issue, "Issue revealed by fuzzer". A large number of references in a markdown document can trigger an overly large response. Patches 0.17.0 contains https://github.com/kivikakk/comrak/commit/70f97f3ea4eae30ffbd1b94c764a3de2f1c41d2a, which limits reference output to a 100Kb maximum. Workarounds n/a References https://github.com/commonmark/cmark/issues/354

    Recommended action: Upgrade to 0.17.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  3. Medium, CVSS 5.3crates.ioPublished

    Comrak vulnerable to quadratic runtime issues when parsing Markdown (GHSL-2023-047)

    CVE-2023-28626 · GHSA-8hqf-xjwp-p67v

    Affected
    • crates.io comrak < 0.17.0
    Fixed in
    0.17.0· Vendor fix available
    Issue
    Impact A range of quadratic parsing issues from cmark/cmark-gfm are also present in Comrak. These can be used to craft denial-of-service attacks on services that use Comrak to parse Markdown. Patches 0.17.0 contains fixes to known quadratic parsing issues. Workarounds n/a References https://github.com/commonmark/cmark/issues/255 https://github.com/commonmark/cmark/issues/389 https://github.com/commonmark/cmark/issues/373 https://github.com/commonmark/cmark/issues/299 https://github.com/commonmark/cmark/issues/388 https://github.com/commonmark/cmark/issues/284 https://github.com/commonmark/cmark/issues/218 https://github.com/commonmark/cmark/pull/232 https://github.com/github/cmark-gfm/blob/c32ef78bae851cb83b7ad52d0fbff880acdcd44a/test/pathologicaltests.py#L63-L65 https://github.com/github/cmark-gfm/blob/c32ef78bae851cb83b7ad52d0fbff880acdcd44a/test/pathologicaltests.py#L87-L89

    Recommended action: Upgrade to 0.17.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  4. Medium, CVSS 6.1crates.ioPublished

    Cross-site Scripting in comrak

    CVE-2021-38186 · GHSA-6wj2-g87r-pm62

    Affected
    • crates.io comrak < 0.10.1
    Fixed in
    0.10.1· Vendor fix available
    Issue
    An issue was discovered in the comrak crate before 0.10.1 for Rust. It mishandles & characters, leading to XSS via & HTML entities.

    Recommended action: Upgrade to 0.10.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  5. Medium, CVSS 6.1crates.ioPublished

    Cross site scripting in comrak

    CVE-2021-27671 · GHSA-xmr7-v725-2jjr

    Affected
    • crates.io comrak < 0.9.1
    Fixed in
    0.9.1· Vendor fix available
    Issue
    An issue was discovered in the comrak crate before 0.9.1 for Rust. Cross site scripting (XSS) can occur because the protection mechanism for data: and javascript: URIs is case-sensitive, allowing (for example) Data: to be used in an attack.

    Recommended action: Upgrade to 0.9.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →