CVE-2026-135699

Quadratic regular expression scans in MDEx auto_close text policy allow CPU denial of service

Published Nov 30, 2026 CVSS 4.0 · 2.1 Low EPSS n/a KEV · Not listed
Description
Inefficient Regular Expression Complexity vulnerability in leandrocp mdex allows an attacker to exhaust CPU via crafted unterminated link or image labels.

When an application completes partial Markdown with the non-default auto_close: [links: :text] or auto_close: [images: :text] policy, MDEx.FragmentParser.text_label/1 in lib/mdex/fragment_parser.ex escapes the pending label with two regular expressions, \A[^\n]+|[^\n]+\z and ~{3,}\z, that are anchored at one end only. The engine retries the unanchored alternative from every offset, so the cost grows with the square of a label line or trailing tilde run. An attacker who supplies the Markdown, such as user content or streamed LLM output, can make a single render of about 60 KB take tens of seconds of CPU. The default auto_close: true policy is not affected.

This issue affects mdex: from 0.14.3 before 0.15.0.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Description Inefficient Regular Expression Complexity vulnerability in leandrocp mdex allows an attacker to exhaust CPU via crafted unterminated link or image labels. When an application completes partial Markdown with the non-default auto_close: [links: :text] or auto_close: [images: :text] policy, MDEx.FragmentParser.text_label/1 in lib/mdex/fragment_parser.ex escapes the pending label with two regular expressions, \A[^\n]+|[^\n]+\z and ~{3,}\z, that are anchored at one end only. The engine retries the unanchored alternative from every offset, so the cost grows with the square of a label line or trailing tilde run. An attacker who supplies the Markdown, such as user content or streamed LLM output, can make a single render of about 60 KB take tens of seconds of CPU. The default auto_close: true policy is not affected. This issue affects mdex: from 0.14.3 before 0.15.0.
Title Quadratic regular expression scans in MDEx auto_close text policy allow CPU denial of service
First Time appeared Leandrocp
Leandrocp mdex
Weaknesses CWE-1333
CPEs cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:*
Vendors & Products Leandrocp
Leandrocp mdex
References
Metrics cvssV4_0

{'score': 2.1, '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'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
EEF
Published
Updated
Nov 30, 2026, 7:01 PM
Reserved
Nov 30, 2026, 4:55 PM
Status
Received
Published
Nov 30, 2026, 7:17 PM
Modified
Nov 30, 2026, 7:17 PM