CVE-2026-53429
Received Received - Intake

Memory Leak in mdex and mdex_native

Vulnerability report for CVE-2026-53429, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-06-29

Last updated on: 2026-06-29

Assigner: EEF

Description

Missing Release of Memory after Effective Lifetime vulnerability in leandrocp mdex and mdex_native allows an attacker who controls a rendered document to cause a denial of service through unbounded native memory exhaustion. The native rendering code permanently leaks memory when rendering a document that contains escaped-tag nodes. The conversion of each %MDEx.EscapedTag{} node into its native representation (From<ExEscapedTag> for NodeValue in the Rust NIF) calls Box::leak on the caller-supplied literal string, which surrenders the backing allocation so that it lives for the entire lifetime of the operating system process and is never freed. Both the byte length of each literal and the number of escaped-tag nodes in a document are attacker-controlled, and there is no size cap, rate limit, or string interning on this path. Every render of a document containing escaped-tag nodes therefore leaks literal_size x node_count bytes that can never be reclaimed, and repeated renders accumulate without bound. Rendering reaches this path through the public MDEx.to_html/1 entry point and any other API that renders a supplied %MDEx.Document{}. Any application that uses mdex (or mdex_native directly) to render documents derived from user-supplied content is affected. Because the leaked memory is never reclaimed for the life of the BEAM process, an attacker can drive resident memory upward without limit until the node exhausts memory and crashes, taking down every process on it. The vulnerable native code originally shipped inside mdex (in native/comrak_nif/src/types/document.rs) and was later extracted into the separate mdex_native package (native/mdex_native_nif/src/types/document.rs), where it remains unpatched. This issue affects mdex from 0.11.0 before 0.12.3, and mdex_native from 0.1.0 before 0.2.3.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-06-29
Last Modified
2026-06-29
Generated
2026-06-30
AI Q&A
2026-06-30
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
leandrocp mdex From 0.11.0 (inc) to 0.12.3 (exc)
leandrocp mdex_native From 0.1.0 (inc) to 0.2.3 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-401 The product does not sufficiently track and release allocated memory after it has been used, making the memory unavailable for reallocation and reuse.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Compliance Impact

The provided information does not specify any direct impact of this vulnerability on compliance with common standards and regulations such as GDPR or HIPAA.

Executive Summary

CVE-2026-53429 is a vulnerability in the mdex and mdex_native packages where rendering documents containing escaped-tag nodes causes a permanent memory leak. The native rendering code uses Box::leak on literal strings, which causes the memory backing these strings to be surrendered and never freed for the lifetime of the operating system process.

Because both the size of each literal string and the number of escaped-tag nodes are controlled by an attacker, there is no limit on how much memory can be leaked. Each render of such a document leaks memory proportional to the literal size multiplied by the number of nodes, and repeated renders accumulate this leak without bound.

This vulnerability can be exploited by an unauthenticated attacker who controls the rendered document content, leading to unbounded native memory exhaustion and ultimately causing the BEAM process to crash.

Impact Analysis

This vulnerability can cause a denial of service by exhausting native memory on the system running the vulnerable mdex or mdex_native packages.

An attacker who controls the content of rendered documents can cause the application to leak memory continuously, increasing resident memory usage without limit until the system runs out of memory and crashes.

This crash affects the BEAM process and can take down every process running on the node, leading to system downtime and loss of availability.

Detection Guidance

This vulnerability causes unbounded native memory exhaustion in the BEAM process rendering documents with escaped-tag nodes. Detection involves monitoring the memory usage of processes using mdex or mdex_native, especially those rendering user-supplied content.

You can detect potential exploitation by observing increasing resident memory usage over time without release, particularly when rendering documents containing escaped-tag nodes.

  • Use system monitoring commands like `top` or `htop` to watch the memory consumption of the BEAM process.
  • Use `ps aux --sort=-rss | grep beam` to identify BEAM processes with high memory usage.
  • If you have access to application logs or metrics, monitor for repeated renders of documents containing escaped-tag nodes or unusually large user-supplied content.
  • Consider instrumenting the application to log or alert when rendering documents with escaped-tag nodes via the MDEx.to_html/1 API or similar.
Mitigation Strategies

To mitigate this vulnerability, immediately upgrade the affected packages to patched versions where the memory leak is fixed.

  • Upgrade mdex to version 0.12.3 or later.
  • Upgrade mdex_native to version 0.2.3 or later.

If upgrading is not immediately possible, consider implementing input validation or rate limiting on documents containing escaped-tag nodes to reduce the risk of memory exhaustion.

Review the fix which changes how escaped-tag literals are handled, ensuring arbitrary literals are rendered as plain text to prevent leaks and potential injection risks.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-53429. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart