Skip to main content

MDEx CVE-2026-137162

| EUVDEUVD-2026-139640 LOW
Inefficient Algorithmic Complexity (CWE-407)
2026-11-30 6b3ad84c-e1a6-4bf7-a703-f496b71e49db GHSA-755x-fx63-g6rx
2.1
CVSS 4.0 · Vendor: 6b3ad84c-e1a6-4bf7-a703-f496b71e49db
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit crafted Markdown to renderer
  2. Delivery
    Final paragraph holds incomplete link ref with long '>' run
  3. Exploit
    expand_quote_prefix/2 rebuilds prefix O(N²)
  4. Execution
    Scheduler busy-loops for seconds
  5. Impact
    CPU exhaustion degrades availability

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V2 - Validation and Business Logic Algorithmic complexity limits
Exploitation Conditions

Two conditions must both hold: (1) the application renders Markdown with auto_close: true or through MDEx.stream/2 - auto-close is off by default and immune, rendering the same input in milliseconds; and (2) the last paragraph must be an incomplete link reference definition that contains '>', so FragmentParser invokes expand_quote_prefix/2 on a long leading run of spaces, tabs or '>'. The attacker only needs the ability to supply Markdown content (PR:N). Limiting factors that reduce realistic risk: the non-default auto_close/streaming configuration, the self-limiting impact (one scheduler saturated for seconds, VA:L, rather than full service denial), and the narrow affected range mdex 0.14.2 through before 0.15.0.

Impact

All signals converge on low real-world priority. The input CVSS 4.0 base score is 2.1 (low), the vuln.today Decision label is 'monitor', this CVE is NOT in CISA KEV, and no EPSS score was supplied. Exploitation status is: no public exploit identified at time of analysis - the only references are the vendor fix commits and the erlef/OSV advisories, not exploit code. The impact is confined to availability (VC:N/VI:N/VA:L): a single BEAM scheduler is tied up for seconds, which degrades but does not fully deny service, and the attack requires a non-default configuration (AT:P). One signal to reconcile: the input vector is AV:L (local), yet the description ('an attacker who supplies Markdown') implies the Markdown may well arrive over the network in a web-facing rendering service - if so AV:N is more realistic. This divergence does not raise overall priority because the impact ceiling (partial, self-limiting CPU exhaustion) and the non-default auto_close requirement both cap the risk. Net: a genuine but low-severity algorithmic-complexity DoS, not a high-urgency issue; patch in normal maintenance cadence.

Exploit ScenarioDerived

An attacker submits a Markdown document to an application that renders with auto_close: true or via MDEx.stream/2, where the final paragraph is an incomplete link reference definition containing '>' followed by a single line of a few hundred kilobytes of '>' characters. Because expand_quote_prefix/2 is body-recursive and rebuilds the prefix for every leading byte, the O(N²) expansion ties up a scheduler for seconds while the same input renders in milliseconds with auto-close off. No public exploit was identified, but the trigger is fully described in the advisory and fix commit; attack complexity is bounded by the required non-default configuration.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 30, 2026

Inefficient algorithmic complexity in the Elixir Markdown library MDEx (0.14.2 to before 0.15.0) lets an attacker who can supply Markdown content saturate a scheduler for seconds by submitting a long run of block quote markers ('>'), spaces or tabs. The flaw only triggers when the document is rendered with auto_close: true or through MDEx.stream/2 - auto-close is off by default and such input renders in milliseconds - and only when the final paragraph is an incomplete link reference definition containing '>', which routes leading quote prefixes through a quadratic expand_quote_prefix/2 recursion. Impact is limited to a localised CPU/scheduler stall (availability-low) rather than full denial of service; no public exploit code or active exploitation is identified in the available data, and the vulnerability is tracked as low priority (monitor) with an EPSS-style real-world expectation that is minimal.

RemediationAI

Upgrade MDEx to 0.15.0 or later, which is the first release containing the upstream fixes; the commit diffs show the quadratic expand_quote_prefix/2 replaced by a reverse-accumulated iodata prefix flattened once, plus linear-time replacements for the regex-based line splitting and tilde handling and a cheaper HTML-tag/opener bookkeeping scheme. Because the vulnerable code path is only reached with auto_close: true or via MDEx.stream/2, an interim compensating control is to render untrusted Markdown with auto-close disabled and to avoid MDEx.stream/2 for attacker-influenced input - the trade-off is loss of the auto-closing convenience for incomplete fragments and changed output for streaming consumers. Where streaming must stay enabled, cap the size and structure of submitted Markdown before it reaches MDEx (reject documents whose final paragraph is an incomplete link reference definition containing '>' or whose lines begin with long runs of spaces, tabs or '>'), understanding that such input filtering is fragile against legitimate long block quotes and can break valid content, and that the vendor's fix is the only complete remedy. Consult the Erlang Ecosystem Foundation advisory (https://cna.erlef.org/cves/CVE-2026-137162.html) and the OSV entry (https://osv.dev/vulnerability/EEF-CVE-2026-137162) for updates; no vendor-released patch version is named in those references other than through the 0.15.0 boundary identified in the input data.

Affected VersionsENISA

mdex 9a4b76802bfcd12ba34337bf3cf7d62621d0fe92 <2c29b28cd0473c24347aa00b95d16f9ce5f9d9af
mdex 0.14.2 <0.15.0

Affected Packages

euvd mdex fix: 0.15.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

MDEx is an Elixir wrapper around the CommonMark-compliant comrak Markdown parser, and MDEx.FragmentParser is a pure-Elixir pre-pass that normalises partial Markdown fragments (for streaming and auto-closing incomplete constructs). CWE-407 (Inefficient Algorithmic Complexity) is the root class here: expand_quote_prefix/2 in lib/mdex/fragment_parser.ex was written body-recursively, rebuilding the accumulated quote prefix with binary concatenation ('expanded <> prefix') for every leading space, tab or '>' byte, so each of N input bytes re-copies the prefix built so far, giving O(N²) work and an unbounded prefix length. The quadratic path is reached only after open_link/5 determines that the trailing paragraph is an unfinished link reference definition and then scans the line's quote prefix. The upstream commits (2c29b28cd0473c24347aa00b95d16f9ce5f9d9af and 9a4b76802bfcd12ba34337bf3cf7d62621d0fe92) convert the accumulator to iodata built in reverse and flattened once with IO.iodata_to_binary/1, making the pass linear; the same patches also rework HTML tag tracking into a {tag, open_tags} tuple context with a map of currently open tags, replace regexes anchored with \z by :binary.match/last_line/trailing_byte_run helpers to avoid regex retry-from-every-offset blowups, and reduce the openers list in continue_after_link/6 using split_while on the last closed link index. The assessed CVSS:3.1 vector is AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L - unauthenticated but requiring the high-complexity precondition of a non-default auto-close/streaming configuration and a specific document shape, with only availability impact. The trigger described in the advisory is a single line of a few hundred kilobytes of '>' characters; no memory-corruption, information-disclosure or code-execution path is described.

Know when Elixir gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (6b3ad84c-e1a6-4bf7-a703-f496b71e49db) PRIMARY 2.1 LOW
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
vuln.today AI 3.7 LOW

No auth to supply Markdown (PR:N); exploitation needs non-default auto_close plus a specific incomplete-link-ref input, hence AC:H; only availability is affected and partially (A:L); AV:N assumes network-supplied Markdown.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (6b3ad84c-e1a6-4bf7-a703-f496b71e49db).

CVSS VectorVendor: 6b3ad84c-e1a6-4bf7-a703-f496b71e49db

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Nov 30, 2026 - 20:05 EUVD

DescriptionCVE.org

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.

Threat Intelligence Overview

EPSS Score
0.2%
Top 85% exploitable
Prevalence
Low
Elixir Markdown library; niche language ecosystem, limited enterprise footprint
Data Quality
3 sources
Confidence: Low

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
None
System Exposure· derived
Small
Automatable· derived
No
Human Impact· derived
Low

Priority Score

10
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +10
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Elixir

View all
CVE-2026-54451 HIGH POC
8.2 Jul 15

Unbounded recursion in the Elixir `protobuf` Hex package (versions >= 0.8.0, < 0.16.1) lets unauthenticated remote attac

CVE-2026-130411 CRITICAL
9.2 Nov 24

Remote code execution in the Elixir Flop pagination library affects versions 0.8.0 through 0.26.6, 0.27.0 through 0.27.2

CVE-2026-91187 CRITICAL
9.3 Sep 24

Improper JWT signature verification in Dashbit's nimble_zta (0.1.2 up to but not including 0.1.3) lets an unauthenticate

CVE-2026-76949 CRITICAL
9.1 Sep 17

Session-swapping authentication bypass in the Elixir library AshAuthentication (versions 4.10.0 before 4.15.0 and 5.0.0-

CVE-2026-88952 CRITICAL
9.1 Sep 17

Account takeover in AshAuthentication (Elixir/Ash) 4.14.0 through 4.14.x and 5.0.0-rc.10 through 5.0.0-rc.13 lets unauth

CVE-2026-91039 CRITICAL
9.1 Sep 17

Authentication bypass in the Elixir library ash_authentication lets an attacker who operates one federated identity-prov

CVE-2026-77866 CRITICAL
9.0 Sep 15

Server-Side Request Forgery protection bypass in the Elixir safeurl library (versions 0.1.0 and later) allows unauthenti

CVE-2026-133555 HIGH
8.9 Nov 24

Arbitrary code execution in applications running the Elixir db_connection library 1.1.0 through 2.10.2 is possible when

CVE-2026-108529 HIGH
8.7 Oct 26

Unauthenticated remote CPU exhaustion in mtrudel Bandit's HTTP/2 server (versions before 1.14.0) is achievable by holdin

CVE-2026-110499 HIGH
8.7 Oct 26

Unbounded per-connection memory and CPU growth in the Elixir Bandit HTTP/2 server (0.3.6 up to 1.14.0) lets an unauthent

CVE-2026-111101 HIGH
8.7 Oct 26

Unauthenticated remote denial of service in the Elixir HTTP server Bandit (mtrudel/bandit) from 0.1.0 before 1.14.0 lets

CVE-2026-113436 HIGH
8.7 Oct 26

Unauthenticated remote attackers can consume disproportionate server CPU on Bandit (mtrudel/bandit, Elixir/Erlang) by se

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy