mdex_native is vulnerable to Uncontrolled recursion
69
CVE Score
Medium
Uncontrolled recursion
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.
Upgrade the mdex_native library to the patch version.
You are affected if you are using a version that falls within the vulnerable range.
0.1.0 - 0.2.2
Fixed in 0.2.3mdex_native is vulnerable to Uncontrolled recursion in versions 0.1.0 - 0.2.2.
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.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.