Skip to content

EEF-CVE-2026-53429 CVE-2026-53429 GHSA-cmvp-gp9f-23xw

Unbounded native memory leak in mdex escaped-tag rendering enables unauthenticated denial of service

Not rated yet Hex
Severity
0.0 / 10
Unknown · CVSS 4.0
Exploit chance (EPSS)
0.19%
Chance of exploitation in the next 30 days. Higher than 8.72% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-401 Missing Release of Memory after Effective Lifetime
Fix
Available
2 packages have a fixed version

Description

Summary

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.

Affected versions

Hex

PackageVulnerableFixed in
mdex
>= 0.11.0, < 0.12.3
0.12.3
mdex_native
>= 0.1.0, < 0.2.3
0.2.3

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.

mdex Hex → 0.12.3

mix
{:mdex, "~> 0.12.3"} # then: mix deps.update mdex

mdex_native Hex → 0.2.3

mix
{:mdex_native, "~> 0.2.3"} # then: mix deps.update mdex_native

Severity breakdown

CVSS 4.0 0.0

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

Attack vector
Local
Attack complexity
Low
Attack requirements
None
Privileges required
None
User interaction
None
Confidentiality (vulnerable system)
None
Integrity (vulnerable system)
None
Availability (vulnerable system)
High
Confidentiality (subsequent systems)
None
Integrity (subsequent systems)
None
Availability (subsequent systems)
None

Weakness

CWE-401: Missing Release of Memory after Effective Lifetime

The product does not sufficiently track and release allocated memory after it has been used, making the memory unavailable for reallocation and reuse.

How to prevent it
  • Implementation: Choose a language or tool that provides automatic memory management, or makes manual memory management less error-prone. For example, glibc in Linux provides protection against free of invalid pointers. When using Xcode to target OS X or iOS, enable automatic reference counting (ARC) [REF-391]. To help correctly and consistently manage memory when programming in C++, consider using a smart pointer class such as std::auto_ptr (defined by ISO/IEC ISO/IEC 14882:2003), std::shared_ptr and std::unique_ptr (specified by an upcoming revision of the C++ standard, informally referred to as C++ 1x), or equivalent solutions such as Boost.
  • Architecture and Design: Use an abstraction library to abstract away risky APIs. Not a complete solution.
  • Architecture and Design, Build and Compilation: Consider using the Boehm-Demers-Weiser garbage collector (bdwgc), which can help avoid leaks.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
EEF-CVE-2026-53426
Atom-table exhaustion denial-of-service via JSON parse_document in MDEx
Not rated yet Also affects mdex
EEF-CVE-2026-54889
Unsanitized URL schemes in MDEx Quill Delta output allow javascript: injection (XSS)
Not rated yet Also affects mdex
EEF-CVE-2026-54888
Uncontrolled recursion over deeply nested Markdown crashes the BEAM in mdex
Not rated yet Also affects mdex
EEF-CVE-2026-53428
Unbounded memory allocation in highlight_lines range expansion in mdex
Not rated yet Also affects mdex
EEF-CVE-2026-53427
Cross-site scripting in MDEx via unescaped highlight_lines_class code-fence attribute
Not rated yet Also affects mdex
PYSEC-2026-3996
vLLM through 0.29.0 fails to properly clean up decode-side metadata for rejected inference requests in prefill/decode disaggregated deployments.
High Same weakness, CWE-401
GHSA-vc2v-76pw-4v95
compression vulnerable to Denial of Service via memory leak on premature response close
High Same weakness, CWE-401
GHSA-xpxj-f2fm-rqch
OliveTin: Unauthenticated DoS via OAuth2 State Memory Exhaustion (Unbounded Map Growth)
High Same weakness, CWE-401

Credits: Jonatan Männchen / EEF, Leandro Pereira, Peter Ullrich

Is this in your code?

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