Read the docs

MDEx auto-close quadratic rescanning allows CPU denial of service

Priority LOW 8CWE-407Published · Updated

Key facts

Attack vector
Local
Privileges required
None
User interaction
None
Attack complexity
Low
Attack requirements
Present
Impact type
Denial of service
Confidentiality · integrity · availability
None · None · Low
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-407.

Summary

MDEx from 0.14.2 before 0.15.0 by leandrocp has an inefficient algorithmic complexity flaw (CWE-407) in MDEx.FragmentParser. While auto-closing the last paragraph, the link scanner rescans the same text for repeated link openers, so processing time grows quadratically. An unauthenticated remote attacker who controls streamed or auto-closed Markdown can exhaust CPU and cause a denial of service in applications that render untrusted Markdown with MDEx.stream/2 or the auto_close option.

Written with Claude Haiku 5.5 from the sources below · 2026-12-01

Description from the CNA

Inefficient Algorithmic Complexity vulnerability in MDEx.FragmentParser in leandrocp mdex allows an attacker who controls streamed or auto-closed Markdown to cause a denial of service through CPU exhaustion. Any application that renders untrusted Markdown with MDEx.stream/2 or the auto_close option is affected, for example live previews or streamed LLM output. While auto-closing the last paragraph, close_bracket/5 in lib/mdex/fragment_parser.ex runs an unbounded forward scan of the link tail for every ](. When that scan finds no valid link, scanning resumes just after the ], so the next ]( rescans the same tail. Each closed link also re-filters every pending image opener. Repeated [](x (, [](x(, or ![ openers in one paragraph therefore cost quadratic time, and about 100 KB of input occupies a scheduler for over ten seconds. This issue affects mdex: from 0.14.2 before 0.15.0.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
Fix Fixed mdex (leandrocp): 0.15.0

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
leandrocpmdex0.14.2 to before 0.15.00.15.0Patch availableCNA
  • mdex Vendorleandrocp Affected 0.14.2 to before 0.15.0 Fixed in 0.15.0 Patch available CNA

CPE names CNA · 1

CPEVersionsRoleVendor
cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:*——leandrocp
  • cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:* Versions — — ·leandrocp

Remediation

Upgrade mdex to version 0.15.0, which fixes the issue. The sources list no other fixed version for mdex.

Written with Claude Haiku 5.5 from the sources below · 2026-12-01

  • Fix · CNA mdex (leandrocp) Fixed in 0.15.0

Fixed in the same release

Records fixed by the same vendor advisory or release, as the CNA lists them.

  • Release ·

    leandrocp mdex 0.15.0

    10 records Highest priority Priority MEDIUM 2 MEDIUM, 8 LOW

    Other records, highest priority first

    • TI-2026-101149 Quadratic CPU consumption in MDEx Quill Delta conversion of nested block quotesPriority MEDIUM 46
    • TI-2026-101148 Quadratic HTML tag tracking in MDEx.stream/2 allows CPU exhaustionPriority MEDIUM 46
    • TI-2026-101154 Code block fence breakout in MDEx injects Slack mentions and linksPriority LOW 38
  • Release ·

    leandrocp mdex 2c29b28cd0473c24347aa00b95d16f9ce5f9d9af

    5 records Highest priority Priority MEDIUM 1 MEDIUM, 4 LOW

    Other records, highest priority first

    • TI-2026-101148 Quadratic HTML tag tracking in MDEx.stream/2 allows CPU exhaustionPriority MEDIUM 46
    • TI-2026-101155 Quadratic CPU consumption in mdex auto-close block quote handlingPriority LOW 26
    • TI-2026-101151 Quadratic CPU use in mdex auto-close trimming of parentheses after bare URLsPriority LOW 24

Timeline

  1. 2026-11-30 Threatist record created from CVE-2026-129522
  2. 2026-11-30 CISA SSVC decision points changed
  3. 2026-11-30 Alias added: GHSA-2v8x-fgp5-9m6j

References

  • TI-2026-39661 Uncontrolled recursion over deeply nested Markdown crashes the BEAM in mdex CVSS 4.0MEDIUM 6.9
  • TI-2026-38511 Unbounded native memory leak in mdex escaped-tag rendering enables unauthenticated denial of service CVSS 4.0MEDIUM 6.9
  • TI-2026-39662 Unsanitized URL schemes in MDEx Quill Delta output allow javascript: injection (XSS) CVSS 4.0MEDIUM 5.1
  • TI-2026-101149 Quadratic CPU consumption in MDEx Quill Delta conversion of nested block quotes CVSS 4.0MEDIUM 6.9
  • TI-2026-101148 Quadratic HTML tag tracking in MDEx.stream/2 allows CPU exhaustion CVSS 4.0MEDIUM 6.9
  • TI-2026-101154 Code block fence breakout in MDEx injects Slack mentions and links CVSS 4.0MEDIUM 5.1
See all 15 →

Sources