6.9
MEDIUM CVSS 4.0
CVE-2026-54888
Uncontrolled recursion over deeply nested Markdown crashes the BEAM in mdex
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.

INFO

Published Date :

June 29, 2026, 8:17 p.m.

Last Modified :

June 30, 2026, 2:14 p.m.

Remotely Exploit :

No

Source :

6b3ad84c-e1a6-4bf7-a703-f496b71e49db
Affected Products

The following products are affected by CVE-2026-54888 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 Leandrocp mdex
2 Leandrocp mdex_native
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 134c704f-9b21-4f2e-91b3-4a467353bcc0
CVSS 4.0 MEDIUM 6b3ad84c-e1a6-4bf7-a703-f496b71e49db
CVSS 4.0 MEDIUM 6b3ad84c-e1a6-4bf7-a703-f496b71e49db
Solution
Update mdex and mdex_native to versions that fix uncontrolled recursion.
  • Update mdex to version 0.12.3 or later.
  • Update mdex_native to version 0.2.3 or later.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-54888 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-2026-54888 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-2026-54888 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2026-54888 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 134c704f-9b21-4f2e-91b3-4a467353bcc0

    Jun. 29, 2026

    Action Type Old Value New Value
    Added Reference https://github.com/leandrocp/mdex_native/security/advisories/GHSA-3w4f-53g2-f66p
    Added SSVC {'id': 'CVE-2026-54888', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'poc'}, {'automatable': 'no'}, {'technicalImpact': 'partial'}], 'version': '2.0.3', 'timestamp': '2026-06-29T20:47:22.348133Z'}
  • New CVE Received by 6b3ad84c-e1a6-4bf7-a703-f496b71e49db

    Jun. 29, 2026

    Action Type Old Value New Value
    Added Affected [{'cpes': ['cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:*'], 'repo': 'https://github.com/leandrocp/mdex', 'vendor': 'leandrocp', 'modules': ['comrak_nif', "'Elixir.MDEx'", "'Elixir.MDEx.Native'"], 'product': 'mdex', 'versions': [{'status': 'affected', 'version': '0.3.0', 'lessThan': '0.12.3', 'versionType': 'semver'}], 'packageURL': 'pkg:hex/mdex', 'packageName': 'mdex', 'programFiles': ['native/comrak_nif/src/types/document.rs', 'lib/mdex.ex', 'lib/mdex/native.ex'], 'collectionURL': 'https://repo.hex.pm', 'defaultStatus': 'unaffected', 'programRoutines': [{'name': 'comrak_nif::types::document::ex_document_to_comrak_ast'}, {'name': 'comrak_nif::types::document::comrak_ast_to_ex_document'}, {'name': "'Elixir.MDEx':parse_document!/1"}, {'name': "'Elixir.MDEx':to_html/1"}, {'name': "'Elixir.MDEx.Native':document_to_html_with_options/2"}]}, {'cpes': ['cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:*'], 'repo': 'https://github.com/leandrocp/mdex', 'vendor': 'leandrocp', 'modules': ['comrak_nif', "'Elixir.MDEx'", "'Elixir.MDEx.Native'"], 'product': 'mdex', 'versions': [{'status': 'affected', 'version': 'd0bc7d55177727c61d188ef465178ab3b81f4f2c', 'lessThan': '6ed94d905f97af188323f042698ae841c02293b4', 'versionType': 'git'}], 'packageURL': 'pkg:github/leandrocp/mdex', 'packageName': 'leandrocp/mdex', 'programFiles': ['native/comrak_nif/src/types/document.rs', 'lib/mdex.ex', 'lib/mdex/native.ex'], 'collectionURL': 'https://github.com', 'defaultStatus': 'unaffected', 'programRoutines': [{'name': 'comrak_nif::types::document::ex_document_to_comrak_ast'}, {'name': 'comrak_nif::types::document::comrak_ast_to_ex_document'}, {'name': "'Elixir.MDEx':parse_document!/1"}, {'name': "'Elixir.MDEx':to_html/1"}, {'name': "'Elixir.MDEx.Native':document_to_html_with_options/2"}]}, {'cpes': ['cpe:2.3:a:leandrocp:mdex_native:*:*:*:*:*:*:*:*'], 'repo': 'https://github.com/leandrocp/mdex_native', 'vendor': 'leandrocp', 'modules': ['mdex_native_nif', "'Elixir.MDExNative.Native'"], 'product': 'mdex_native', 'versions': [{'status': 'affected', 'version': '0.1.0', 'lessThan': '0.2.3', 'versionType': 'semver'}], 'packageURL': 'pkg:hex/mdex_native', 'packageName': 'mdex_native', 'programFiles': ['native/mdex_native_nif/src/types/document.rs', 'lib/mdex_native/native.ex'], 'collectionURL': 'https://repo.hex.pm', 'defaultStatus': 'unaffected', 'programRoutines': [{'name': 'mdex_native_nif::types::document::ex_document_to_comrak_ast'}, {'name': 'mdex_native_nif::types::document::comrak_ast_to_ex_document'}, {'name': "'Elixir.MDExNative.Native':parse_document/2"}, {'name': "'Elixir.MDExNative.Native':document_to_html_with_options/2"}]}, {'cpes': ['cpe:2.3:a:leandrocp:mdex_native:*:*:*:*:*:*:*:*'], 'repo': 'https://github.com/leandrocp/mdex_native', 'vendor': 'leandrocp', 'modules': ['mdex_native_nif', "'Elixir.MDExNative.Native'"], 'product': 'mdex_native', 'versions': [{'status': 'affected', 'version': '956528c5e31746253347029e810a969ab916fd27', 'lessThan': '947696c47bc22bea5dffc0f78c946fa6b70ce183', 'versionType': 'git'}], 'packageURL': 'pkg:github/leandrocp/mdex_native', 'packageName': 'leandrocp/mdex_native', 'programFiles': ['native/mdex_native_nif/src/types/document.rs', 'lib/mdex_native/native.ex'], 'collectionURL': 'https://github.com', 'defaultStatus': 'unaffected', 'programRoutines': [{'name': 'mdex_native_nif::types::document::ex_document_to_comrak_ast'}, {'name': 'mdex_native_nif::types::document::comrak_ast_to_ex_document'}, {'name': "'Elixir.MDExNative.Native':parse_document/2"}, {'name': "'Elixir.MDExNative.Native':document_to_html_with_options/2"}]}]
    Added 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.
    Added CVSS V4.0 AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
    Added CWE CWE-674
    Added Reference https://cna.erlef.org/cves/CVE-2026-54888.html
    Added Reference https://github.com/leandrocp/mdex_native/commit/947696c47bc22bea5dffc0f78c946fa6b70ce183
    Added Reference https://github.com/leandrocp/mdex_native/security/advisories/GHSA-3w4f-53g2-f66p
    Added Reference https://osv.dev/vulnerability/EEF-CVE-2026-54888
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.