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.
Analysis and contextual insights are available on OpenCVE Cloud.
No vendor fix or workaround currently provided.
Additional remediation guidance may be available on OpenCVE Cloud.
Tracking
Sign in to view the affected projects.
No advisories yet.
Mon, 30 Nov 2026 19:00:00 +0000
| Type | Values Removed | Values Added |
|---|---|---|
| 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. | |
| Title | Quadratic CPU consumption in mdex auto-close block quote prefix expansion | |
| First Time appeared |
Leandrocp
Leandrocp mdex |
|
| Weaknesses | CWE-407 | |
| CPEs | cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:* | |
| Vendors & Products |
Leandrocp
Leandrocp mdex |
|
| References |
| |
| Metrics |
cvssV4_0
|
Status: PUBLISHED
Assigner: EEF
Published:
Updated: 2026-11-30T18:43:23.753Z
Reserved: 2026-11-30T06:43:22.951Z
Link: CVE-2026-137162
No data.
Status : Received
Published: 2026-11-30T19:17:55.303
Modified: 2026-11-30T19:17:55.303
Link: CVE-2026-137162
No data.
OpenCVE Enrichment
No data.
-
CWE-407
Inefficient Algorithmic Complexity