{"id":"CVE-2026-129522","summary":"Quadratic rescanning in MDEx auto-close link scanner allows CPU denial of service","details":"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.\n\nWhile 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.\n\nThis issue affects mdex: from 0.14.2 before 0.15.0.","aliases":["EEF-CVE-2026-129522"],"modified":"2026-11-30T20:45:43.000356150Z","published":"2026-11-30T18:45:21.032Z","database_specific":{"cwe_ids":["CWE-407"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/129xxx/CVE-2026-129522.json","unresolved_ranges":[{"extracted_events":[{"range":[{"introduced":"0.14.2"},{"fixed":"0.15.0"}],"source":"AFFECTED_FIELD","strategy":"StandardRange"}]}],"cna_assigner":"EEF"},"references":[{"type":"ADVISORY","url":"https://cna.erlef.org/cves/CVE-2026-129522.html"},{"type":"WEB","url":"https://github.com"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/129xxx/CVE-2026-129522.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/bea359152bc1f63f3256ee86ca207151b815940d"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-129522"},{"type":"WEB","url":"https://osv.dev/vulnerability/EEF-CVE-2026-129522"},{"type":"WEB","url":"https://repo.hex.pm"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/leandrocp/mdex","events":[{"introduced":"bea359152bc1f63f3256ee86ca207151b815940d"},{"fixed":"2c29b28cd0473c24347aa00b95d16f9ce5f9d9af"},{"fixed":"bea359152bc1f63f3256ee86ca207151b815940d"}],"database_specific":{"extracted_events":[{"range":[{"introduced":"bea359152bc1f63f3256ee86ca207151b815940d"},{"fixed":"2c29b28cd0473c24347aa00b95d16f9ce5f9d9af"}],"source":"AFFECTED_FIELD","strategy":"StandardRange"},{"source":"REFERENCES_COMMIT","range":[{"fixed":"bea359152bc1f63f3256ee86ca207151b815940d"}]},{"range":[{"fixed":"2c29b28cd0473c24347aa00b95d16f9ce5f9d9af"}],"source":"REFERENCES_COMMIT"}]}}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-129522.json"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"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"}]}