cve.bz

CVE-2026-53428 Unbounded memory allocation in highlight_lines range expansion in mdex

6.9 mediumEPSS 0.2%Fix available

Medium (6.9) in leandrocp. EPSS 0.2% estimated probability of exploitation activity in the next 30 days. Fixed in mdex 0.12.3.

On this page
Memory Allocation with Excessive Size Value vulnerability in leandrocp mdex allows an unauthenticated attacker to cause a denial of service through unbounded memory allocation. comrak_nif::lumis_adapter::LumisAdapter::parse_highlight_lines in native/comrak_nif/src/lumis_adapter.rs eagerly expands a user-controlled inclusive line range from a fenced code block's highlight_lines decorator into a Vec<usize>, pushing one element per integer in the range with no upper bound on the range size. An attacker who can supply Markdown that an application renders with MDEx.to_html/2 (for example a comment, chat message, or wiki page) can embed a code block whose info string is rust highlight_lines="1-100000000", forcing the native adapter to allocate roughly 8 bytes per line in the range. A payload that differs by only a few bytes can therefore allocate hundreds of megabytes, and a sufficiently large range (for example 1-2000000000) exhausts host memory and aborts the BEAM, denying service to every user of the rendering process. The per-line write loop additionally tests membership with a linear scan over the same vector, degrading rendering to a quadratic cost even for ranges that do not immediately exhaust memory. The vulnerable native code originally shipped inside mdex (in native/comrak_nif/src/autumnus_adapter.rs, later renamed to native/comrak_nif/src/lumis_adapter.rs) and was later extracted into the separate mdex_native package (native/mdex_native_nif/src/lumis_adapter.rs). This issue affects mdex: from 0.11.0 before 0.12.3; mdex_native: from 0.1.0 before 0.2.3.

Severity

CVSS 4.0

6.9 medium
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 8th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2026-06-29. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-789 Memory Allocation with Excessive Size Value
Published
Modified
Assigned by
EEF (CNA)
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

  • mdex (Hex): fixed in 0.12.3
  • mdex_native (Hex): fixed in 0.2.3

Ask an AI about this CVE

Show the promptExplain CVE-2026-53428 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-53428?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-53428?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-53428 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
leandrocp mdexfrom 0.11.0 before 0.12.3
leandrocp mdex_nativefrom 0.1.0 before 0.2.3

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
EEF-CVE-2026-53428Hexmdex>=0.11.0 <0.12.30.12.3
EEF-CVE-2026-53428Hexmdex_native>=0.1.0 <0.2.30.2.3
EEF-CVE-2026-53428v0.12.2, v0.12.1, v0.12.0, v0.11.7, v0.11.6 and 6 moreno fix published
EEF-CVE-2026-53428v0.2.2, v0.2.1, v0.2.0, v0.1.5, v0.1.4 and 3 moreno fix published

References

Check your stackJSON