CVE-2026-53426
Atom-table exhaustion denial-of-service via JSON parse_document in MDEx
Vulnerability description
Allocation of Resources Without Limits or Throttling vulnerability in leandrocp MDEx allows Excessive Allocation.
MDEx.parse_document/2 accepts a {:json, json} source. In lib/mdex.ex, the private json_to_node/1 function passes the attacker-controlled node_type value to Module.concat/1, which calls String.to_atom/1 and interns a brand-new atom for every distinct value. Atoms are never garbage collected on the BEAM, so a crafted JSON document carrying a unique node_type at each (deeply nested) node mints one permanent atom per node.
A single document can intern hundreds of thousands of atoms, and a large enough document exhausts the default atom table (around 1,048,576 atoms) and aborts the entire Erlang VM, taking down every process on the node. Any application that passes untrusted input to the {:json, ...} source of MDEx.parse_document is exposed to an unauthenticated denial-of-service.
This issue affects mdex from 0.4.3 before 0.13.2.
Affected
pkg:hex/mdex
| Module | Source File | Routine |
|---|---|---|
MDEx
|
lib/mdex.ex
|
MDEx.parse_document/2
|
MDEx.json_to_node/1
|
pkg:github/leandrocp/mdex
| Module | Source File | Routine |
|---|---|---|
MDEx
|
lib/mdex.ex
|
MDEx.parse_document/2
|
MDEx.json_to_node/1
|
| Status | Type | Version | Changes / Fixed in |
|---|---|---|---|
| affected | git ⓘ | cbb59a3f79
|
< 00fddf4442
|
Workarounds
Do not pass untrusted or attacker-controlled input to the {:json, ...} source of MDEx.parse_document/2. The {:markdown, ...} source is not affected.
References
- https://github.com/leandrocp/mdex/security/advisories/GHSA-923r-7vf4-5vw8 vendor-advisory related
- https://osv.dev/vulnerability/EEF-CVE-2026-53426 related
- https://github.com/leandrocp/mdex/commit/00fddf444220a1f1cc0af0a1cab6738804878387 patch
Credits
- Finder: Peter Ullrich
- Remediation developer: Leandro Pereira
- Analyst: Jonatan Männchen / EEF
CVE record as JSON:
GET /cves/CVE-2026-53426.json
OSV record as JSON:
GET /osv/EEF-CVE-2026-53426.json