Intel

AIKIDO-2026-468377

mdex_native is vulnerable to Uncontrolled recursion

CVE-2026-54888Published Jul 2, 2026
July 2, 2026

69

CVE Score

Medium

Uncontrolled recursion

Are you affected? Scan for Free

TL;DR

mdex_native 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.

How do I fix this?

Upgrade the mdex_native library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range.

Versions

0.1.0 - 0.2.2

Fixed in 0.2.3

Background info

mdex_native is vulnerable to Uncontrolled recursion in versions 0.1.0 - 0.2.2.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea