GHSA-5r3x-p7xx-x6q5 CVE-2023-28631
Comrak AST node data is not validated (GHSL-2023-049)
- Severity
- 5.3 / 10
- Critical · CVSS 3.1
- Exploit chance (EPSS)
- 1.27%
- Chance of exploitation in the next 30 days. Higher than 69.78% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-755 Improper Handling of Exceptional Conditions
- Fix
0.17.0- Upgrade comrak to this version or later
Description
Impact
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.
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]andVec<u8>fields in the AST.
References
n/a
Affected versions
crates.io
| Package | Vulnerable | Fixed in |
|---|---|---|
| comrak | < 0.17.0 |
0.17.0 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
comrak crates.io → 0.17.0
- cargo
cargo update -p comrak --precise 0.17.0
Severity breakdown
CVSS 3.1 5.3
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- Low
Weakness
CWE-755: Improper Handling of Exceptional Conditions
The product does not handle or incorrectly handles an exceptional condition.
References
Advisories
Packages
Other links
- github.com/kivikakk/comrak/security/advisories/GHSA-5r3x-p7xx-x6q5
- github.com/kivikakk/comrak/commit/9ff5f8df0ac951f5742d22a72c39b89a15f56639
- github.com/kivikakk/comrak/releases/tag/0.17.0
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OUYME…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PTWZW…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VQ3UB…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OUYME…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PTWZW…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VQ3UB…
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-xxmq-4vph-956w Comrak vulnerable to production of excessive output when parsing Markdown (GHSL-2023-048) | Medium | Also affects comrak |
| GHSA-8hqf-xjwp-p67v Comrak vulnerable to quadratic runtime issues when parsing Markdown (GHSL-2023-047) | High | Also affects comrak |
| GHSA-6wj2-g87r-pm62 Cross-site Scripting in comrak | Medium | Also affects comrak |
| GHSA-xmr7-v725-2jjr Cross site scripting in comrak | Medium | Also affects comrak |
| CVE-2026-109619 PHP has various global state that temporarily points into request memory. | Critical Known exploited | Same weakness, CWE-755 |
| CVE-2026-109618 PHP uses longjmp() for out-of-memory (OOM) errors to exit the current context and abort handling of the request. | Critical Known exploited | Same weakness, CWE-755 |
| GHSA-85xf-c7hm-whqw vLLM: Structured-output request errors escape the request boundary and terminate the shared EngineCore — engine-fatal denial of service (3 sites) | Medium | Same weakness, CWE-755 |
| GHSA-x5rw-q4pp-hg5g devalue: stringifyAsync can cause an unhandled rejection despite a caught returned promise | High | Same weakness, CWE-755 |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor