Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-137162— Quadratic CPU consumption in mdex auto-close block quote prefix expansion

Quick assessment

Affected
leandrocp mdex
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

In leandrocp mdex 中存在低效算法复杂度漏洞:攻击者在开启 auto-close 时提供 Markdown,可通过一长串 block quote 标记使 CPU 耗尽。 当以 auto_close: true 渲染 Markdown,或通过 MDEx.stream/2 渲染时,MDEx.FragmentParser 会检查最后一个段落是否以不完整的 link reference definition 结尾。如果该段落包含 >,则每一行的 leading quote prefix 会在 lib/mde

CVSS 2.1 · Low
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-137162

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Quadratic CPU consumption in mdex auto-close block quote prefix expansion
Source: CVE Program / CVE List V5
Vulnerability 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.
Source: CVE Program / CVE List V5
CVSS Information
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
Source: CVE Program / CVE List V5
Vulnerability Type
算法复杂性
Source: CVE Program / CVE List V5

Affected Products

Vendor Product Affected Versions CPE Subscribe
leandrocp mdex 0.14.2 ~ 0.15.0 cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:*
leandrocp mdex 9a4b76802bfcd12ba34337bf3cf7d62621d0fe92 ~ 2c29b28cd0473c24347aa00b95d16f9ce5f9d9af cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:*

II. Public POCs for CVE-2026-137162

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-137162

请登录查看更多情报信息。

Other References for CVE-2026-137162 (4)

Same Patch Batch · leandrocp · 2026-11-30 · 10 CVEs total

CVE-2026-134915 6.9 MEDIUM Quadratic HTML tag tracking in MDEx.stream/2 allows CPU exhaustion via unmatched closing t
CVE-2026-134916 6.9 MEDIUM Quadratic CPU consumption in MDEx Quill Delta conversion of nested block quotes
CVE-2026-131906 6.9 MEDIUM Cubic-time nested block quote rendering in MDEx to_slack enables CPU denial of service
CVE-2026-135775 5.9 MEDIUM Quadratic CPU consumption in mdex auto-close trimming of trailing parentheses after bare U
CVE-2026-136268 5.1 MEDIUM Code block fence breakout in MDEx to_slack/2 allows Slack mention and link injection
CVE-2026-129522 2.1 LOW Quadratic rescanning in MDEx auto-close link scanner allows CPU denial of service
CVE-2026-136129 2.1 LOW Dangerous URL filter bypass via control characters in MDEx Quill Delta output (XSS)
CVE-2026-136130 2.1 LOW Slack mention injection through link destinations in MDEx.to_slack/2
CVE-2026-135699 2.1 LOW Quadratic regular expression scans in MDEx auto_close text policy allow CPU denial of serv

IV. Related Vulnerabilities