9.8
CRITICAL CVSS 3.1
CVE-2023-28631
Comrak Unvalidated Byte Array Vulnerability
Description

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

INFO

Published Date :

March 28, 2023, 9:15 p.m.

Last Modified :

Nov. 21, 2024, 7:55 a.m.

Remotely Exploit :

Yes !
Affected Products

The following products are affected by CVE-2023-28631 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Comrak_project comrak
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 3.1 MEDIUM [email protected]
CVSS 3.1 CRITICAL [email protected]
Solution
A vulnerability in Comrak allows for the execution of arbitrary code due to the lack of validation of byte arrays.
  • Update the affected rust-askama, rust-askama_shared, and/or rust-comrak packages.
  • If unable to update, manually validate UTF-8 correctness of all data when assigning to `&[u8]` and `Vec<u8>` fields in the AST.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2023-28631 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2023-28631 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2023-28631 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2023-28631 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference https://github.com/kivikakk/comrak/commit/9ff5f8df0ac951f5742d22a72c39b89a15f56639
    Added Reference https://github.com/kivikakk/comrak/security/advisories/GHSA-5r3x-p7xx-x6q5
    Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/OUYME2VA555X6567H7ORIJQFN4BVGT6N/
    Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/PTWZWCT7KCX2KTXTLPUYZ3EHOONG4X46/
    Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/VQ3UBC7LE4VPCMZBTADIBL353CH7CPVV/
  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • CVE Modified by [email protected]

    Apr. 29, 2023

    Action Type Old Value New Value
    Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/VQ3UBC7LE4VPCMZBTADIBL353CH7CPVV/ [No Types Assigned]
    Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/OUYME2VA555X6567H7ORIJQFN4BVGT6N/ [No Types Assigned]
  • CVE Modified by [email protected]

    Apr. 29, 2023

    Action Type Old Value New Value
    Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/PTWZWCT7KCX2KTXTLPUYZ3EHOONG4X46/ [No Types Assigned]
  • Initial Analysis by [email protected]

    Apr. 06, 2023

    Action Type Old Value New Value
    Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    Changed Reference Type https://github.com/kivikakk/comrak/commit/9ff5f8df0ac951f5742d22a72c39b89a15f56639 No Types Assigned https://github.com/kivikakk/comrak/commit/9ff5f8df0ac951f5742d22a72c39b89a15f56639 Patch
    Changed Reference Type https://github.com/kivikakk/comrak/security/advisories/GHSA-5r3x-p7xx-x6q5 No Types Assigned https://github.com/kivikakk/comrak/security/advisories/GHSA-5r3x-p7xx-x6q5 Vendor Advisory
    Added CWE NIST CWE-755
    Added CPE Configuration OR *cpe:2.3:a:comrak_project:comrak:*:*:*:*:*:rust:*:* versions up to (excluding) 0.17.0
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
Vulnerability Scoring Details
Base CVSS Score: 9.8
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality Impact
Integrity Impact
Availability Impact
Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

0.25 }} -0.70%

score

0.48020

percentile