CVE-2026-134915
published medium CVSS 4.0 · 6.9Quadratic HTML tag tracking in MDEx.stream/2 allows CPU exhaustion via unmatched closing tags
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| leandrocp | — | mdex0.14.0 to < 0.15.0 · Other versions: unaffected | Affected | Not stated | EEF |
| leandrocp | — | leandrocp/mdexmdex · a88793cb0fc5caf75bf878b92c64d36817824765 to < 2c29b28cd0473c24347aa00b95d16f9ce5f9d9af · Other versions: unaffected | Affected | Not stated | EEF |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 6.9 / 10
- Severity
- medium
- Provider
- EEF · cna
- Vector string
- CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
- Scenarios
- en: GENERAL
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| leandrocp | mdex | 0.14.0 to < 0.15.0 (affected · semver)Default: unaffected | EEF · cna |
| leandrocp | mdex | a88793cb0fc5caf75bf878b92c64d36817824765 to < 2c29b28cd0473c24347aa00b95d16f9ce5f9d9af (affected · git)Default: unaffected | EEF · cna |
Weaknesses
1- CWE-407 CWE-407 Inefficient Algorithmic Complexity
References
4- EEF CNA record for CVE-2026-134915 https://cna.erlef.org/cves/CVE-2026-134915.html
- Fix commit 2c29b28 in leandrocp/mdex https://github.com/leandrocp/mdex/commit/2c29b28cd0473c24347aa00b95d16f9ce5f9d9af
- Introducing commit a88793c in leandrocp/mdex https://github.com/leandrocp/mdex/commit/a88793cb0fc5caf75bf878b92c64d36817824765
- OSV record EEF-CVE-2026-134915 https://osv.dev/vulnerability/EEF-CVE-2026-134915
Provider assertions
1EEF · cna
Quadratic HTML tag tracking in MDEx.stream/2 allows CPU exhaustion via unmatched closing tags
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- ed023dba8f22d70274ae6b009a6be938db17547941033a8fc6fb3fe00afeb0d8
- Ingested
- 30 Nov 2026, 18:59:00 UTC
- Source record
- Official CVE record