Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 0.1%top 96%

CVE-2026-53428: CWE-789 Memory Allocation with Excessive Size Value in leandrocp mdex

0
Medium
VulnerabilityCVE-2026-53428cvecve-2026-53428cwe-789
Published: 06/29/2026 (06/29/2026, 18:52:36 UTC)
Source: CVE Database V5
Vendor/Project: leandrocp
Product: mdex

Description

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/lumis_adapter.rs) and was later extracted into the separate mdex_native package (native/mdex_native_nif/src/lumis_adapter.rs), where it remains unpatched. This issue affects mdex from 0.11.0 before 0.12.3, and mdex_native from 0.1.0 before 0.2.3.

CVSS v4.0

Score 6.9medium

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
High
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

Affected software

mdex
pkg:hex/mdex
Affected versions
>=0.11.0 <0.12.3
GitHub Actionsmore threats →cve
leandrocp/mdex
pkg:github/leandrocp/mdex
mdex_native
pkg:hex/mdex_native
Affected versions
>=0.1.0 <0.2.3
GitHub Actionsmore threats →cve
leandrocp/mdex_native
pkg:github/leandrocp/mdex_native
CPE configurations (2)
cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:*
cpe:2.3:a:leandrocp:mdex_native:*:*:*:*:*:*:*:*

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/06/2026, 22:42:58 UTC

Technical Analysis

The vulnerability in leandrocp mdex involves unbounded memory allocation caused by the parse_highlight_lines function in the native Rust code. This function eagerly expands a user-supplied inclusive line range from a fenced code block's highlight_lines decorator into a vector, allocating memory proportional to the range size without any upper limit. An attacker can supply Markdown with a large highlight_lines range (e.g., "1-100000000") to force allocation of hundreds of megabytes or more, exhausting host memory and causing the BEAM process to abort, resulting in denial of service. The quadratic time complexity of the per-line membership test further degrades performance. The vulnerable code was originally part of mdex and later moved to mdex_native, where it remains unpatched. The affected versions are mdex 0.11.0 up to but not including 0.12.3, and mdex_native 0.1.0 up to but not including 0.2.3.

Potential Impact

Successful exploitation allows an unauthenticated attacker to cause a denial of service by exhausting memory resources of the host running the mdex rendering process. This leads to the BEAM virtual machine aborting, disrupting service availability for all users relying on the rendering functionality. There is no indication of code execution or data corruption beyond denial of service.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The vulnerability affects mdex versions from 0.11.0 before 0.12.3 and mdex_native from 0.1.0 before 0.2.3. Users should upgrade to versions 0.12.3 or later for mdex and 0.2.3 or later for mdex_native once available. Until patches are released, consider restricting or sanitizing user input that controls the highlight_lines range to prevent excessively large values.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
EEF
Date Reserved
2026-06-09T11:01:47.529Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 6a42c23927e9c79719595c04

Added to database: 06/29/2026, 19:06:33 UTC

Last enriched: 07/06/2026, 22:42:58 UTC

Last updated: 08/12/2026, 12:41:10 UTC

Views: 80

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses