CVE-2026-137162
LOW 2.1CVSS 4.0Quadratic CPU consumption in mdex auto-close block quote prefix expansion
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.
- Published
- 30 Nov 2026
- Last modified
- 3 Dec 2026
- Assigned by
- 6b3ad84c-e1a6-4bf7-a703-f496b71e49db
- NVD status
- Received
- Weakness
- CWE-407
- Also known as
- EEF-CVE-2026-137162
- Sources
- NVDJSONCVE ListJSONOSV EEF-CVE-2026-137162JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | 6b3ad84c-e1a6-4bf7-a703-f496b71e49db (Secondary) | CVSS 4.0 | LOW 2.1 | 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
| CVE List | EEF | CVSS 4.0 | LOW 2.1 | 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 |
| CVE List | CISA-ADP | SSVC | Exploitation: none; Automatable: no; Technical Impact: partial |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| CVE List | https://repo.hex.pm | mdexcpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:* |
>= 0.14.2, < 0.15.0 | 0.15.0 |
| CVE List | https://github.com | leandrocp/mdexcpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:* |
>= 9a4b76802bfcd12ba34337bf3cf7d62621d0fe92, < 2c29b28cd0473c24347aa00b95d16f9ce5f9d9af | 2c29b28cd0473c24347aa00b95d16f9ce5f9d9af |
| OSV | Hex | mdex | >= 0.14.2, < 0.15.0 | 0.15.0 |
References
- https://cna.erlef.org/cves/CVE-2026-137162.html · related, third-party-advisory, WEB
- https://github.com/leandrocp/mdex/commit/2c29b28cd0473c24347aa00b95d16f9ce5f9d9af · patch, FIX
- https://github.com/leandrocp/mdex/commit/9a4b76802bfcd12ba34337bf3cf7d62621d0fe92 · related, WEB
- https://osv.dev/vulnerability/EEF-CVE-2026-137162 · related
- https://hex.pm/packages/mdex · PACKAGE
History
- 3 Dec 2026 19:56 UTC · NVD: updated (other details)
- 3 Dec 2026 18:56 UTC · CVE List: updated (other details)
- 30 Nov 2026 19:41 UTC · NVD: first stored (published 30 Nov 2026)
- 30 Nov 2026 19:01 UTC · OSV: first stored (published 30 Nov 2026)
- 30 Nov 2026 18:49 UTC · CVE List: first stored (published 30 Nov 2026)