Skip to main content

mdex EUVDEUVD-2026-40176

| CVE-2026-53429 MEDIUM
Memory Leak (CWE-401)
2026-06-29 EEF
6.9
CVSS 4.0 · Vendor: EEF
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify endpoint rendering user-supplied MDEx documents
  2. Delivery
    Craft document with many large EscapedTag literal strings
  3. Exploit
    Submit repeated render requests at low rate
  4. Execution
    Native Rust heap leaks accumulate across requests
  5. Persist
    BEAM VM process exhausts OS memory
  6. Impact
    Node-wide crash kills all co-located services

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Resource cleanup, leak prevention
Exploitation Conditions

Exploitation requires three specific conditions: (1) the application must pass user-controlled content to MDEx.to_html/1 or any other API that renders an %MDEx.Document{} struct - applications that render only static, developer-authored documents are not at risk; (2) the user-supplied document must contain at least one %MDEx.EscapedTag{} node, as only this specific node type triggers the Box::leak path (other node types in a document are not affected); and (3) the attacker must be able to invoke rendering repeatedly, as a single render leaks memory proportional to literal size but a crash requires accumulation across many renders. Authentication is not required by the library itself - whether the rendering endpoint is protected depends on the application's own access controls. There is no configuration flag that enables or disables the vulnerable code path; all versions of mdex 0.11.0-0.12.2 and mdex_native 0.1.0-0.2.2 that process escaped-tag nodes are unconditionally affected. The BEAM process model amplifies impact: a crash is node-wide, not request-scoped, so a single successful exhaustion attack kills every Erlang/Elixir process on the node.

Impact

The CNA-assigned CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N, score 6.9) designates AV:L (Local), which may understate real-world exposure: the CVE description explicitly states that any application rendering documents derived from user-supplied content is affected, which in Elixir/Phoenix deployments typically means a network-facing endpoint - an AV:N assessment is arguably more representative of attacker reachability. No EPSS score was provided in the available data, and the vulnerability is not listed in CISA KEV; no public exploit code exists at time of analysis. However, the attack concept requires no expertise - constructing a document with large escaped-tag literals is trivial. The severity is compounded by the BEAM process model: a crash kills every co-located Erlang/Elixir process on the node, not just the request handler, making the blast radius disproportionate to the 6.9 score. Impact is strictly availability (A:H); there is no confidentiality or integrity exposure. The absence of KEV listing and public POC tempers urgency, but the patch is available and straightforward to apply.

Exploit ScenarioDerived

An attacker targeting a Phoenix web application that renders user-submitted Elixir document structures sends repeated HTTP requests containing documents with hundreds of %MDEx.EscapedTag{} nodes each carrying multi-kilobyte literal strings. Each call to MDEx.to_html/1 silently leaks native Rust heap memory that the BEAM VM can never reclaim; across dozens of requests submitted slowly to avoid rate limits, the node's resident memory climbs steadily until the OS kills the BEAM process, crashing the entire application and all co-located services simultaneously.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 29, 2026

Native Rust heap exhaustion in leandrocp mdex and mdex_native allows any attacker who can supply document content to MDEx.to_html/1 to crash the BEAM Erlang/Elixir node through unbounded memory accumulation. The Rust NIF permanently leaks memory by calling Box::leak on every escaped-tag literal string during document rendering, with no size cap or rate limit - leakage compounds across repeated renders proportional to literal_size multiplied by node_count, and the BEAM VM can never reclaim native allocations once surrendered this way. No public exploit code has been identified and the vulnerability is not listed in CISA KEV; vendor-released patches are available in mdex 0.12.3 and mdex_native 0.2.3.

RemediationAI

The primary fix is to upgrade mdex to version 0.12.3 or later and mdex_native to version 0.2.3 or later, which remove the Box::leak call in the EscapedTag conversion path; the upstream patch commit is cbd927fb5061b488de8d90a8ef6df65718ca1fe6 at https://github.com/leandrocp/mdex_native/commit/cbd927fb5061b488de8d90a8ef6df65718ca1fe6. If patching is not immediately feasible, the most targeted compensating control is to pre-validate or sanitize documents before rendering - specifically, strip or reject any %MDEx.EscapedTag{} nodes in documents sourced from untrusted user input before passing them to MDEx.to_html/1 or any other rendering API; this eliminates the vulnerable code path at the cost of losing escaped-tag rendering for user content. A secondary mitigation is to configure BEAM VM memory limits (e.g., via +MBas or OS-level cgroups) and ensure Erlang supervisors restart the node on OOM - this limits total damage but does not prevent the crash and introduces service interruption. Rate-limiting rendering endpoints is a weak compensating control since the leak is permanent and accumulates even at low request rates.

Affected VersionsENISA

mdex_native 0.1.0 <0.2.3
mdex 0.11.0 <0.12.3
mdex 81e4d14dd3aa5b206e395c7f372b9b413793015f <6ed94d905f97af188323f042698ae841c02293b4
mdex_native 956528c5e31746253347029e810a969ab916fd27 <cbd927fb5061b488de8d90a8ef6df65718ca1fe6

Affected Packages

euvd mdex fix: 0.12.3
euvd mdex_native fix: 0.2.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

mdex and its extracted dependency mdex_native are Elixir libraries that wrap a Rust NIF (Native Implemented Function) built on the comrak CommonMark parser. The vulnerability, identified as CWE-401 (Missing Release of Memory after Effective Lifetime), resides in the From<ExEscapedTag> for NodeValue trait implementation inside native/comrak_nif/src/types/document.rs (mdex) and native/mdex_native_nif/src/types/document.rs (mdex_native). When converting an %MDEx.EscapedTag{} Elixir struct node into its native Rust NodeValue representation, the code calls Box::leak on the caller-supplied literal string. Box::leak in Rust intentionally transfers ownership of a heap allocation to the OS process, bypassing the Rust borrow checker's drop mechanism and preventing deallocation for the entire process lifetime. Because NIFs live outside the BEAM VM's garbage-collected heap, the BEAM allocator has no visibility into these native allocations and cannot reclaim them, even between requests. The affected CPE entries are cpe:2.3:a:leandrocp:mdex and cpe:2.3:a:leandrocp:mdex_native.

Know when Mdex gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (EEF) PRIMARY 6.9 MEDIUM
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
vuln.today AI 7.5 HIGH

The library is reached through network-facing application endpoints rendering user content; the library imposes no authentication; impact is availability-only with no scope change.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (EEF).

CVSS VectorVendor: EEF

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.1%
Top 97% exploitable
Prevalence
Low
niche Elixir markdown NIF library, limited ecosystem adoption
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy