CVE-2026-53429
JSON

6.9medium

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

Severity
6.9medium CVSS:4.0 by EEF
Exploit likelihood
0.19% (higher than 9% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
EEF
Also known as
EEF-CVE-2026-53429GHSA-cmvp-gp9f-23xw

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 × 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). This issue affects mdex: from 0.11.1 before 0.12.3; mdex_native: from 0.1.0 before 0.2.3.

Affected

Product or packageVersionsReported by
mdexfrom 0.11.1 before 0.12.3CVE List
leandrocp/mdexfrom 81e4d14dd3aa5b206e395c7f372b9b413793015f before 6ed94d905f97af188323f042698ae841c02293b4CVE List
mdex_nativefrom 0.1.0 before 0.2.3CVE List
leandrocp/mdex_nativefrom 956528c5e31746253347029e810a969ab916fd27 before cbd927fb5061b488de8d90a8ef6df65718ca1fe6CVE List
mdex (Hex)from 0.11.1 before 0.12.3Erlang Ecosystem Foundation
mdex_native (Hex)from 0.1.0 before 0.2.3Erlang Ecosystem Foundation
https://github.com/leandrocp/mdexfrom 81e4d14dd3aa5b206e395c7f372b9b413793015f before 6ed94d905f97af188323f042698ae841c02293b4Erlang Ecosystem Foundation
https://github.com/leandrocp/mdex_nativefrom 956528c5e31746253347029e810a969ab916fd27 before cbd927fb5061b488de8d90a8ef6df65718ca1fe6Erlang Ecosystem Foundation

All scores

EEF6.9medium CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
Erlang Ecosystem FoundationNot scored CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Classification

CWE-401

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

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 × 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). This issue affects mdex: from 0.11.1 before 0.12.3; mdex_native: from 0.1.0 before 0.2.3.

Erlang Ecosystem Foundation

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 × 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).

This issue affects mdex: from 0.11.1 before 0.12.3; mdex_native: from 0.1.0 before 0.2.3.

NVD (es)

Vulnerabilidad de liberación de memoria faltante después de la vida útil efectiva en leandrocp mdex y mdex_native permite a un atacante que controla un documento renderizado causar una denegación de servicio a través del agotamiento ilimitado de la memoria nativa. El código de renderizado nativo fuga memoria permanentemente al renderizar un documento que contiene nodos de etiqueta escapada. La conversión de cada nodo %MDEx.EscapedTag{} en su representación nativa (From[ExEscapedTag] para NodeValue en el NIF de Rust) llama a Box::leak en la cadena literal proporcionada por el llamador, lo que cede la asignación de respaldo para que viva durante toda la vida útil del proceso del sistema operativo y nunca se libere. Tanto la longitud en bytes de cada literal como el número de nodos de etiqueta escapada en un documento están controlados por el atacante, y no hay límite de tamaño, límite de velocidad o internamiento de cadenas en esta ruta. Cada renderizado de un documento que contiene nodos de etiqueta escapada, por lo tanto, fuga literal_size x node_count bytes que nunca pueden ser reclamados, y los renderizados repetidos se acumulan sin límite. El renderizado alcanza esta ruta a través del punto de entrada público MDEx.to_html/1 y cualquier otra API que renderice un %MDEx.Document{} proporcionado. Cualquier aplicación que utilice mdex (o mdex_native directamente) para renderizar documentos derivados de contenido proporcionado por el usuario se ve afectada. Debido a que la memoria fugada nunca se reclama durante la vida útil del proceso BEAM, un atacante puede impulsar la memoria residente hacia arriba sin límite hasta que el nodo agote la memoria y falle, derribando cada proceso en él. El código nativo vulnerable se envió originalmente dentro de mdex (en native/comrak_nif/src/types/document.rs) y fue posteriormente extraído en el paquete mdex_native separado (native/mdex_native_nif/src/types/document.rs), donde permanece sin parchear. Este problema afecta a mdex desde 0.11.0 antes de 0.12.3, y a mdex_native desde 0.1.0 antes de 0.2.3.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-53429 changed 2026-11-20CVE Terms of Use
Erlang Ecosystem FoundationEEF-CVE-2026-53429 changed 2026-11-26CC-BY-4.0
NVDCVE-2026-53429 changed 2026-11-20Public domain