🛡️ CVE-2026-54888 — mdex
Description
Uncontrolled recursion over deeply nested Markdown crashes the BEAM in mdex
Summary
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.
How this vulnerability can be exploited
This issue can be reached with local access to the system, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. Rated impact: confidentiality none, integrity none, availability high.
Weakness class
CVE-2026-54888 is classified as CWE-674: Uncontrolled Recursion. The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.
Affected software
CVE-2026-54888 is recorded against 3 packages.
- mdex
- mdex-native
- unknown
Timeline and source
Published on 29 June 2026 and last revised on 30 July 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from NVD.
References
github.com (Advisory)
cna.erlef.org (Web)
github.com (Fix)
hex.pm (Package)
hex.pm (Package)
Details
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Affected Packages
| Software | From version | Fixed in |
|---|---|---|
| mdex | — | — |
| mdex-native | — | — |
| unknown | — | — |
References
Similar Threats
- Unknown CVE-2026-53426
- Unknown CVE-2026-53427
- Unknown CVE-2026-53428
- Unknown CVE-2026-53429
- Unknown CVE-2026-54889
Free Vulnerability Check
Is your site affected by CVE-2026-54888?
BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against CVE-2026-54888 and other known CVE records.
Scan My Site Free →No credit card required · Results in minutes
ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.