cvelo
P3 · MediumCVSS 6.9EPSS 0.3%

CVE-2026-134915

  • CVE-2026-134915
  • GHSA-6843-mw9g-x99r
  • EUVD-2026-139639

Description

Inefficient Algorithmic Complexity vulnerability in leandrocp mdex allows an attacker who controls Markdown passed to MDEx.stream/2 to exhaust CPU via unmatched HTML closing tags. MDEx.stream/2 tracks open HTML tags with MDEx.FragmentParser.continue_html_context/2 in lib/mdex/fragment_parser.ex. Every non-void opening tag is pushed onto an unbounded list, and close_html_tag/2 scans the whole list for each closing tag. A closer with no matching opener leaves the list unchanged, so the next closer scans it again. An HTML block of N openers followed by N unmatched closers therefore costs O(N²), and about 270 KB of input keeps a scheduler busy for tens of seconds. The tracking runs on every HTML block and inline HTML literal regardless of the auto_close option and the render unsafe setting. MDEx.to_html/1 and the other non-streaming entry points are not affected. This issue affects mdex: from 0.14.0 before 0.15.0.

Text from the NVD record.

Affected

  • leandrocp mdex

    • from 0.14.0 to before 0.15.0

Product versions from the ENISA EUVD record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.