{"id":"CVE-2026-134915","summary":"Quadratic HTML tag tracking in MDEx.stream/2 allows CPU exhaustion via unmatched closing tags","details":"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.\n\nMDEx.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.\n\nThis issue affects mdex: from 0.14.0 before 0.15.0.","aliases":["EEF-CVE-2026-134915"],"modified":"2026-11-30T20:00:17.897429458Z","published":"2026-11-30T18:43:11.147Z","database_specific":{"cna_assigner":"EEF","cwe_ids":["CWE-407"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/134xxx/CVE-2026-134915.json","unresolved_ranges":[{"extracted_events":[{"source":"AFFECTED_FIELD","strategy":"StandardRange","range":[{"introduced":"0.14.0"},{"fixed":"0.15.0"}]}]}]},"references":[{"type":"ADVISORY","url":"https://cna.erlef.org/cves/CVE-2026-134915.html"},{"type":"WEB","url":"https://github.com"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/134xxx/CVE-2026-134915.json"},{"type":"PACKAGE","url":"https://github.com/leandrocp/mdex"},{"type":"FIX","url":"https://github.com/leandrocp/mdex/commit/2c29b28cd0473c24347aa00b95d16f9ce5f9d9af"},{"type":"FIX","url":"https://github.com/leandrocp/mdex/commit/a88793cb0fc5caf75bf878b92c64d36817824765"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-134915"},{"type":"WEB","url":"https://osv.dev/vulnerability/EEF-CVE-2026-134915"},{"type":"WEB","url":"https://repo.hex.pm"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/leandrocp/mdex","events":[{"introduced":"a88793cb0fc5caf75bf878b92c64d36817824765"},{"fixed":"2c29b28cd0473c24347aa00b95d16f9ce5f9d9af"},{"fixed":"a88793cb0fc5caf75bf878b92c64d36817824765"}],"database_specific":{"extracted_events":[{"range":[{"introduced":"a88793cb0fc5caf75bf878b92c64d36817824765"},{"fixed":"2c29b28cd0473c24347aa00b95d16f9ce5f9d9af"}],"source":"AFFECTED_FIELD","strategy":"StandardRange"},{"range":[{"fixed":"a88793cb0fc5caf75bf878b92c64d36817824765"}],"source":"REFERENCES_COMMIT"},{"range":[{"fixed":"2c29b28cd0473c24347aa00b95d16f9ce5f9d9af"}],"source":"REFERENCES_COMMIT"}]}}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-134915.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"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"}]}