Read the docs
TI-2023-13150 Aliases CVE-2023-28631GHSA-5r3x-p7xx-x6q5

Attacker controlled data in AST nodes is not validated in comrak

Priority MEDIUM 51CWE-755Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
—
Confidentiality · integrity · availability
High · High · High
Fix status
Fixed

Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub.

Summary

comrak is a CommonMark + GFM compatible Markdown parser and renderer written in rust. A Comrak AST can be constructed manually by a program instead of parsing a Markdown document with `parse_document`. This AST can then be converted to HTML via `html::format_document_with_plugins`. 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. Version 0.17.0 contains adjustments to the AST, storing strings instead of unvalidated byte arrays. Users are advised to upgrade. Users unable to upgrade may manually validate UTF-8 correctness of all data when assigning to `&[u8]` and `Vec<u8>` fields in the AST. This issue is also tracked as `GHSL-2023-049`.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.01268 69th percentileScored 2026-11-07
Fix Fixed comrak (kivikakk): 0.17.0comrak (crates.io): 0.17.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
Yes
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
kivikakkcomrakbefore 0.17.00.17.0Patch availableCNA
—comrak (crates.io)before 0.17.00.17.0Patch availableGHSA-5r3x-p7xx-x6q5
  • comrak Vendorkivikakk Affected before 0.17.0 Fixed in 0.17.0 Patch available CNA
  • comrak (crates.io) Vendor— Affected before 0.17.0 Fixed in 0.17.0 Patch available GHSA-5r3x-p7xx-x6q5

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:comrak_project:comrak:*:*:*:*:*:rust:*:*before 0.17.0VulnerableComrak Project
  • cpe:2.3:a:comrak_project:comrak:*:*:*:*:*:rust:*:* Versions before 0.17.0 Vulnerable ·Comrak Project

Remediation

  • Fix · CNA comrak (kivikakk) Fixed in 0.17.0
  • Fix · GHSA-5r3x-p7xx-x6q5 comrak (crates.io) Fixed in 0.17.0 Advisory →

Vendor assessments

Red Hat

Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat

Timeline

  1. 2026-10-02 Threatist record created from CVE-2023-28631
  2. 2026-10-03 Alias added: GHSA-5r3x-p7xx-x6q5

References

  • TI-2023-13145 Quadratic runtime when parsing Markdown in comrak CVSS 3.1HIGH 7.5
  • TI-2021-15863 An issue was discovered in the comrak crate before 0.10.1 for Rust. CVSS 3.1MEDIUM 6.1
  • TI-2021-09116 An issue was discovered in the comrak crate before 0.9.1 for Rust. CVSS 3.1MEDIUM 6.1

Sources