# CVE-2026-129522: Quadratic rescanning in MDEx auto-close link scanner allows CPU denial of service

- Severity: Low 2.1 (CVSS:4.0, scored by EEF) `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`
- 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:45:21.032Z
- Modified: 2026-11-30T19:17:43.437Z
- Also known as: EEF-CVE-2026-129522
- Weaknesses: CWE-407
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: EEF

## 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.

(As written by CVE List.)

## Affected

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

## Every score

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

## References

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

## Sources

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

---

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