EEF-CVE-2026-134916

Source
https://cna.erlef.org/osv/EEF-CVE-2026-134916.html
Import Source
https://cna.erlef.org/osv/EEF-CVE-2026-134916.json
JSON Data
https://api.osv.dev/v1/vulns/EEF-CVE-2026-134916
Aliases
  • CVE-2026-134916
Published
2026-11-30T18:43:38Z
Modified
2026-11-30T18:45:05Z
Severity
  • 6.9 (Medium) CVSS_V4 - CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N (Source: CNA) CVSS Calculator
Summary
Quadratic CPU consumption in MDEx Quill Delta conversion of nested block quotes
Details

Summary

Inefficient Algorithmic Complexity vulnerability in leandrocp mdex allows an attacker who controls Markdown input to cause a denial of service through CPU exhaustion via deeply nested block quotes passed to MDEx.to_delta/2.

When converting a document to a Quill Delta, MDEx.DeltaConverter.default_convert_node/3 in lib/mdex/delta_converter.ex calls apply_block_format/2 for every MDEx.BlockQuote and MDEx.Alert node, and that function rewrites every op produced by the node's descendants. Conversion therefore costs the nesting depth times the number of ops inside, and the parser places no limit on block quote depth. A document of a few hundred kilobytes keeps a scheduler busy for minutes, while parsing and HTML rendering of the same input finish in milliseconds. The parse_time budget bounds only the native parse, not the conversion.

This issue affects mdex: from 0.8.3 before 0.15.0.

Details

1. Input. Comrak sets no limit on block quote depth, so a line of d > characters followed by n lazy-continuation lines produces d nested MDEx.BlockQuote nodes holding about 2n ops, in only d+2n bytes.

2. Conversion. MDEx.DeltaConverter.default_convert_node/3 converts each block quote's children first and then calls apply_block_format/2, which maps over every descendant op to add the blockquote attribute to newline ops. MDEx.Alert does the same with its alert attributes. Each nesting level walks and rebuilds the whole op list again, so total work is O(d·n).

3. Effect. Measured on 0.14.7, depth 2,000 with 20,000 lines (42 KB) takes 1.9 s, depth 5,000 with 50,000 lines (105 KB) takes 15 s, and depth 10,000 with 100,000 lines (210 KB) takes 172 s. Parsing and MDEx.to_html/2 stay under about 100 ms for the same inputs. budget: [parse_time: ...] limits only the native parse: with parse_time: 1000 the 105 KB input still spent 12 s in conversion.

Proof of concept

  1. Build a Markdown document of 4,000 > characters, then a and a newline, then 40,000 lines of b (about 84 KB).
  2. Convert it with MDEx.to_delta!(markdown, budget: [parse_time: 1_000]).
  3. Observe that the call takes several seconds (9.4 s on 0.14.9), while MDEx.to_html!/1 on the same input finishes in about 16 ms. Doubling depth and line count roughly quadruples the conversion time.

Impact

An unauthenticated attacker who can submit Markdown to an application that converts it with MDEx.to_delta/2 can occupy BEAM schedulers for minutes per small request, degrading or denying service to every other user of the node while the attack continues.

Database specific
{
    "$schema":  "https://cna.erlef.org/schemas/osv/record-0.1.0.json",
    "capec_ids":  [
        "CAPEC-230"
    ],
    "cpe_ids":  [
        "cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:*"
    ],
    "cwe_ids":  [
        "CWE-407"
    ]
}
References
Credits
    • Peter Ullrich - FINDER
    • Peter Ullrich - REPORTER
    • Jonatan Männchen / EEF - ANALYST
    • Leandro Pereira - REMEDIATION_DEVELOPER

Affected packages

Hex / mdex

Package

Name
mdex
Purl
pkg:hex/mdex

Affected ranges

Type
SEMVER
Events
Introduced
0.8.3
Fixed
0.15.0

Affected versions

0.*
0.8.3
0.8.4
0.8.5
0.8.6
0.9.0
0.9.1
0.9.2
0.9.3
0.9.4
0.10.0
0.11.0
0.11.1
0.11.2
0.11.3
0.11.4
0.11.5
0.11.6
0.11.7
0.12.0
0.12.1
0.12.2
0.12.3
0.12.4
0.12.5
0.13.0
0.13.1
0.13.2
0.13.3
0.13.4
0.13.5
0.14.0
0.14.1
0.14.2
0.14.3
0.14.4
0.14.5
0.14.6
0.14.7
0.14.8
0.14.9

Ecosystem specific

{
    "$schema":  "https://cna.erlef.org/schemas/osv/affected-0.1.0.json",
    "modules":  [
        "'Elixir.MDEx'",
        "'Elixir.MDEx.DeltaConverter'"
    ],
    "program_files":  [
        "lib/mdex.ex",
        "lib/mdex/delta_converter.ex"
    ],
    "program_routines":  [
        "'Elixir.MDEx':to_delta/2",
        "'Elixir.MDEx':'to_delta!'/2",
        "'Elixir.MDEx.DeltaConverter':convert/2",
        "'Elixir.MDEx.DeltaConverter':default_convert_node/3",
        "'Elixir.MDEx.DeltaConverter':apply_block_format/2"
    ]
}

Database specific

$schema
"https://cna.erlef.org/schemas/osv/affected-0.1.0.json"
modules
[
    "'Elixir.MDEx'",
    "'Elixir.MDEx.DeltaConverter'"
]
program_files
[
    "lib/mdex.ex",
    "lib/mdex/delta_converter.ex"
]
program_routines
[
    "'Elixir.MDEx':to_delta/2",
    "'Elixir.MDEx':'to_delta!'/2",
    "'Elixir.MDEx.DeltaConverter':convert/2",
    "'Elixir.MDEx.DeltaConverter':default_convert_node/3",
    "'Elixir.MDEx.DeltaConverter':apply_block_format/2"
]
source
"https://cna.erlef.org/osv/EEF-CVE-2026-134916.json"

Git / github.com/leandrocp/mdex

Affected ranges

Type
GIT
Repo
https://github.com/leandrocp/mdex
Events

Affected versions

v0.*
v0.10.0
v0.11.0
v0.11.1
v0.11.2
v0.11.3
v0.11.4
v0.11.5
v0.11.6
v0.11.7
v0.12.0
v0.12.1
v0.12.2
v0.12.3
v0.12.4
v0.12.5
v0.13.0
v0.13.1
v0.13.2
v0.13.3
v0.13.4
v0.13.5
v0.14.0
v0.14.1
v0.14.2
v0.14.3
v0.14.4
v0.14.5
v0.14.6
v0.14.7
v0.14.8
v0.14.9
v0.8.3
v0.8.4
v0.8.5
v0.8.6
v0.9.0
v0.9.1
v0.9.2
v0.9.3
v0.9.4

Database specific

$schema
"https://cna.erlef.org/schemas/osv/affected-0.1.0.json"
modules
[
    "'Elixir.MDEx'",
    "'Elixir.MDEx.DeltaConverter'"
]
program_files
[
    "lib/mdex.ex",
    "lib/mdex/delta_converter.ex"
]
program_routines
[
    "'Elixir.MDEx':to_delta/2",
    "'Elixir.MDEx':'to_delta!'/2",
    "'Elixir.MDEx.DeltaConverter':convert/2",
    "'Elixir.MDEx.DeltaConverter':default_convert_node/3",
    "'Elixir.MDEx.DeltaConverter':apply_block_format/2"
]
source
"https://cna.erlef.org/osv/EEF-CVE-2026-134916.json"