CVE-2026-54888 Details
Description
Uncontrolled Recursion vulnerability in leandrocp mdex allows denial of service via deeply nested Markdown input. mdex converts between an Elixir %MDEx.Document{} struct and Comrak's internal AST using two mutually recursive Rust functions, ex_document_to_comrak_ast and comrak_ast_to_ex_document, in the NIF source file document.rs. Neither function enforces a maximum nesting depth, so the recursion depth is bounded only by the structure of the input. An attacker who can get a Markdown document rendered (for example through MDEx.parse_document!/1 or MDEx.to_html/1) can supply a document with thousands of nested block quotes, which drives unbounded recursion across the NIF boundary and exhausts the native C stack. Because the resulting stack overflow is an uncatchable SIGSEGV raised inside a NIF, it cannot be contained by the Erlang runtime. It terminates the operating system process running the BEAM, killing every Elixir and Erlang process on the node, not just the caller that triggered the render. No authentication or special privileges are required. The vulnerable conversion code was extracted from mdex into the separate mdex_native package starting in mdex 0.12.3. This issue affects mdex from 0.3.0 before 0.12.3 and mdex_native from 0.1.0 before 0.2.3.
A denial-of-service vulnerability has been identified in the LeandroCP MDEx library, which is an Elixir Markdown processor that uses the Rust Comrak parser via a Native Implemented Function (NIF). The issue arises from uncontrolled recursion in the conversion between Elixir's `%MDEx.Document{}` structure and Comrak's Abstract Syntax Tree (AST). This vulnerability affects MDEx versions 0.3.0 prior to 0.12.3, as well as the separate mdex_native package in versions 0.1.0 prior to 0.2.3. The vulnerability is triggered by deeply nested Markdown input, such as documents with thousands of nested block quotes. When such a document is rendered using public MDEx functions, it causes unbounded recursion that exhausts the native C stack, leading to a segmentation fault. This fault is uncatchable and results in the termination of the entire operating system process running the BEAM, affecting all Elixir and Erlang processes on the node. The vulnerability requires no authentication or special privileges to exploit.
Users can upgrade to MDEx version 0.12.3 or later, or to version 0.2.3 or later of the mdex_native package, to address this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jun 29, 2026CISA-ADP
Assessed Jun 29, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/leandrocp/mdex_native/security/advisories/GHSA-3w4f-53g2-f66p | CISA-ADP | AdvisoryExploitRemedyVendor |
| https://cna.erlef.org/cves/CVE-2026-54888.html | EEF | AdvisoryBundleVendor |
| https://github.com/leandrocp/mdex_native/commit/947696c47bc22bea5dffc0f78c946fa6b70ce183 | EEF | Source CodeVendor |
| https://github.com/leandrocp/mdex_native/security/advisories/GHSA-3w4f-53g2-f66p | EEF | AdvisoryExploitRemedyVendor |
| https://osv.dev/vulnerability/EEF-CVE-2026-54888 | EEF | AdvisoryBundle |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-674 | Uncontrolled Recursion | EEF |
Affected Products
| Product | Versions |
|---|---|
| leandrocp mdex | >= 0.3.0, < 0.12.3 (semver) |
CPE
Remediation
| |
| leandrocp mdex_native | >= 0.1.0, < 0.2.3 (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 29, 2026 | CVE Modified | CISA-ADP |
| Jun 29, 2026 | New CVE Received | EEF |
Volerion