Hex
CVE-2026-137162
Quadratic CPU consumption in mdex auto-close block quote prefix expansion
- Severity
- Low 2.1
- Published
- 30 Nov 2026
- Last changed
- 30 Nov 2026
- Added to UpHeron
- 30 Nov 2026
- Fixed in
- 0.15.0
- Attack
- Needs local access · Only under certain conditions · No login needed · No user action needed
- Attacker can
- Slow it down
- CVSS vector
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- Sources
- CVE Program
Description
Inefficient Algorithmic Complexity vulnerability in leandrocp mdex allows an attacker who supplies Markdown to exhaust CPU via a long run of block quote markers when auto-close is enabled.
When Markdown is rendered with auto_close: true or through MDEx.stream/2, MDEx.FragmentParser checks whether the last paragraph ends in an incomplete link reference definition. If that paragraph contains >, each line's leading quote prefix is expanded by expand_quote_prefix/2 in lib/mdex/fragment_parser.ex. That function is body-recursive and prepends each character to the prefix built so far, copying it again for every leading space, tab or >, so a line of N such bytes costs O(N²). The prefix length is not bounded. A single line of a few hundred kilobytes of > ties up a scheduler for seconds, while the same input renders in milliseconds with auto-close off.
This issue affects mdex: from 0.14.2 before 0.15.0.
Affected software
| Software | Affected versions |
|---|---|
mdexHex · osv:Hex:mdex |
|
About mdex
Vulnerabilities in mdex
- In our list
- 12
- Published in the last 12 months
- 12
- Critical, last 12 months
- 0
- High, last 12 months
- 0
- Known exploited
- 0
- CVE-2026-129522Quadratic rescanning in MDEx auto-close link scanner allows CPU denial of serviceLow 2.1 30 Nov 2026
- CVE-2026-135775Quadratic CPU consumption in mdex auto-close trimming of trailing parentheses after bare URLsMedium 5.9 30 Nov 2026
- CVE-2026-131906Cubic-time nested block quote rendering in MDEx to_slack enables CPU denial of serviceMedium 6.9 30 Nov 2026
- CVE-2026-136129Dangerous URL filter bypass via control characters in MDEx Quill Delta output (XSS)Low 2.1 30 Nov 2026
- CVE-2026-135699Quadratic regular expression scans in MDEx auto_close text policy allow CPU denial of serviceLow 2.1 30 Nov 2026
- CVE-2026-136130Slack mention injection through link destinations in MDEx.to_slack/2Low 2.1 30 Nov 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-137162