# CVE-2026-134915: Quadratic HTML tag tracking in MDEx.stream/2 allows CPU exhaustion via unmatched closing tags

- Severity: Medium 6.9 (CVSS:4.0, scored by EEF) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.32%, higher than 26% of CVEs (2026-12-01)
- Published: 2026-11-30T18:43:11.147Z
- Modified: 2026-11-30T19:17:47.130Z
- Also known as: EEF-CVE-2026-134915
- Weaknesses: CWE-407
- Assigned by: 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.

(As written by CVE List.)

## Affected

- mdex: from 0.14.0 before 0.15.0
- leandrocp/mdex: from a88793cb0fc5caf75bf878b92c64d36817824765 before 2c29b28cd0473c24347aa00b95d16f9ce5f9d9af
- mdex (Hex): from 0.14.0 before 0.15.0
- https://github.com/leandrocp/mdex: from a88793cb0fc5caf75bf878b92c64d36817824765 before 2c29b28cd0473c24347aa00b95d16f9ce5f9d9af

## Every score

- EEF: CVSS:4.0 6.9 Medium `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`
- Erlang Ecosystem Foundation: CVSS:4.0 `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`

## References

- <https://cna.erlef.org/cves/CVE-2026-134915.html> (related, third-party-advisory, web)
- <https://osv.dev/vulnerability/EEF-CVE-2026-134915> (related)
- <https://github.com/leandrocp/mdex/commit/a88793cb0fc5caf75bf878b92c64d36817824765> (related, web)
- <https://github.com/leandrocp/mdex/commit/2c29b28cd0473c24347aa00b95d16f9ce5f9d9af> (fix, patch)
- <https://hex.pm/packages/mdex> (package)

## Sources

- CVE List: [CVE-2026-134915](https://www.cve.org/CVERecord?id=CVE-2026-134915), CVE Terms of Use, modified 2026-11-30
- Erlang Ecosystem Foundation: [EEF-CVE-2026-134915](https://osv.dev/vulnerability/EEF-CVE-2026-134915), CC-BY-4.0, modified 2026-11-30
- NVD: [CVE-2026-134915](https://nvd.nist.gov/vuln/detail/CVE-2026-134915), Public domain, modified 2026-11-30

---

Page: https://cve.day/CVE-2026-134915 · Whole record: https://cve.day/CVE-2026-134915.json · Rebuilt by cve.day 2026-11-30T19:32:42.472Z
