Description
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.
Severity (CVSS)
| Base score | 2.1 |
|---|---|
| Severity | Low |
| Version | CVSS 4.0 |
| Vector | CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N |
| Provided by | CNA |
Weaknesses
- CWE-407 — CWE-407 Inefficient Algorithmic Complexity
Affected products
| Vendor | Product | Versions |
|---|---|---|
| leandrocp | mdex | 0.14.2 to <0.15.0 [affected] |
| leandrocp | mdex | bea359152bc1f63f3256ee86ca207151b815940d to <2c29b28cd0473c24347aa00b95d16f9ce5f9d9af [affected] |
References
- https://cna.erlef.org/cves/CVE-2026-129522.html (related third-party-advisory)
- https://osv.dev/vulnerability/EEF-CVE-2026-129522 (related)
- https://github.com/leandrocp/mdex/commit/bea359152bc1f63f3256ee86ca207151b815940d (related)
- https://github.com/leandrocp/mdex/commit/2c29b28cd0473c24347aa00b95d16f9ce5f9d9af (patch)
Assess this vulnerability
Compare your deployed product and version with the source record. Review vendor references for fixes and workarounds. A CVSS score describes technical severity; it does not establish that your systems are affected or that exploitation has occurred.
Browse all CVE security advisories · Symaro cybersecurity services
Generated from the official CVE List on 01 Dec 2026 08:04 UTC.