Home › CVE › Vulnerabilities
CVE-2026-137162 — leandrocp mdex
One of 10 leandrocp mdex vulnerabilities published together by NVD: our article covers all of them.
VulnerabilitiesSummary
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.
Severity breakdown
Low · 2.1
An attacker without an account can exploit this with local access, without any user action, but only under specific conditions.
- Attack from
- local access (a logged-in user, or a malicious file opened on the device)
- Attack complexity
- low (no special conditions)
- Special conditions
- only in some setups or conditions
- Login needed
- no
- User action needed
- no
- Impact
- low on availability, none on confidentiality and integrity
- Impact on other systems
- none
Weakness
- CWE-407: Inefficient Algorithmic Complexity
Affected and fixed versions
| Product | Affected versions | Fixed in |
|---|---|---|
| leandrocp mdex | ≥ 0.14.2, < 0.15.0 | 0.15.0 |
References by type
Patches and fixed releases
- github.com/leandrocp/mdex/commit/2c29b28cd0473c24347aa00b95d16f9ce5f9d9…
- github.com/leandrocp/mdex/commit/9a4b76802bfcd12ba34337bf3cf7d62621d0fe…
Other references
Affected
- leandrocp mdex
What to do
- Follow the vendor advisory and the references below for fixed versions and workarounds.
Frequently asked questions
What is CVE-2026-137162?
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 autoclose: true or through MDEx.stream/2, MDEx.FragmentParser checks whether the last paragraph ends in an incomplete link reference definition. Weakness type: Inefficient Algorithmic Complexity (CWE-407).
How severe is CVE-2026-137162?
CVE-2026-137162 has a CVSS 4.0 base score of 2.1 (low), from the CNA. An attacker without an account can exploit this with local access, without any user action, but only under specific conditions.
Is CVE-2026-137162 being exploited?
Not as far as is known: CVE-2026-137162 is not in CISA's Known Exploited Vulnerabilities catalog as of November 30, 2026.
Which versions are affected by CVE-2026-137162?
leandrocp mdex ≥ 0.14.2, < 0.15.0 (fixed in 0.15.0).
How do I fix CVE-2026-137162?
Update to a fixed release: leandrocp mdex 0.15.0.