Security Resilience

CVE-2023-28631

Comrak Project Comrak ≤ 0.17.0

Published
28 March 2023
Modified
21 November 2024
Patch / advisory
CVSS Score v3.1 5.3
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
EPSS Score 0.013 69th percentile
Risk Priority 47 floored blend · peak EPSS

CVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). Risk Priority is our own derived reading, not an NVD score.

Summary

CVE-2023-28631 is a medium-severity Improper Handling of Exceptional Conditions (CWE-755) vulnerability in Comrak Project Comrak. Its CVSS base score is 5.3 (Medium).

Operationally, ranked in the top 31% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

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`.

CWE(s)

Related Threats

CVEs Like This One

CVE-2023-28626Same product: Comrak Project Comrak
CVE-2024-47491Shared CWE-755
CVE-2024-21907Shared CWE-755
CVE-2023-40184Shared CWE-755
CVE-2023-45820Shared CWE-755
CVE-2024-30380Shared CWE-755
CVE-2026-81515Shared CWE-755
CVE-2024-39552Shared CWE-755
CVE-2026-44505Shared CWE-755
CVE-2026-49232Shared CWE-755

Affected Assets

comrak project
comrak
≤ 0.17.0

Mitigating Controls

Likely Mitigating Controls AI

Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.

addresses: CWE-755

Provides defined handling (alert and additional actions) for the exceptional condition of audit logging failure.

addresses: CWE-755

Supplies a concrete handling action (safe mode) for exceptional conditions, mitigating risks from improper or absent handling that could allow continued attacks.

addresses: CWE-755

By preparing users for contingency scenarios, the control promotes proper handling of exceptional conditions instead of default or unsafe behaviors.

addresses: CWE-755

An updated contingency plan defines current actions for exceptional conditions, reducing the window for attackers to exploit improper handling leading to system failure.

addresses: CWE-755

Procedures ensure proper handling of exceptional conditions to support effective incident response.

addresses: CWE-755

Incident response testing confirms proper handling of exceptional conditions to limit exploit impact.

addresses: CWE-755

Gives users guidance on incident handling, reducing improper handling of exceptional conditions that could stem from exploited weaknesses.

addresses: CWE-755

Enforces structured response to exceptional conditions so the system cannot remain in an unsafe state.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

degrades

Documented operating procedures may specify exception handling but do not guarantee implementation.

A.8.15 Logging partial match
finds

Logging captures unhandled exceptions, aiding detection but not preventing the weakness.

finds

Monitoring can surface unhandled exceptions but does not enforce proper handling.

blocks

Secure SDLC mandates exception-handling requirements and testing that directly prevent improper handling of exceptional conditions.

blocks

A.8.26 explicitly lists resilience against malicious attacks including SQL injections, input validation, error message handling, and several integrity/authorization requirements that address exceptional conditions in a minority of cases, but most CWE-755 instances (e.g. unhandled nulls, resource errors, unexpected states) fall outside its named topics.

blocks

A.8.27 mandates security-by-design principles (fail securely, least privilege, defense-in-depth, distrust external input, assume-breach) plus design reviews that can catch and stop many but not all mishandlings of exceptional conditions before they reach production code; a bounded remainder (e.g. subtle runtime error paths, library-level faults, or post-review regressions) can still be present and exploitable.

Hardening callouts derived

DISA STIG baselines are authored against specific weaknesses. Where this CVE cites a broad weakness class, the mapping is not asserted at that abstraction (owner ruling, 2026-09-25: grade only at Base and below), so no rule is shown here rather than a rule shown against the wrong grain.

  • No fine-grained STIG row for CWE-755, a class-level weakness. Rules are authored against its narrower children: CWE-274, CWE-280, CWE-333.

References