{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-134915",
        "assignerOrgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
        "state": "PUBLISHED",
        "assignerShortName": "EEF",
        "dateReserved": "2026-11-30T16:56:06.346Z",
        "datePublished": "2026-11-30T18:43:11.147Z",
        "dateUpdated": "2026-12-03T18:13:26.736Z"
    },
    "containers": {
        "cna": {
            "affected": [
                {
                    "collectionURL": "https://repo.hex.pm",
                    "cpes": [
                        "cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:*"
                    ],
                    "defaultStatus": "unaffected",
                    "modules": [
                        "'Elixir.MDEx.FragmentParser'",
                        "'Elixir.MDEx'"
                    ],
                    "packageName": "mdex",
                    "packageURL": "pkg:hex/mdex",
                    "product": "mdex",
                    "programFiles": [
                        "lib/mdex/fragment_parser.ex",
                        "lib/mdex.ex"
                    ],
                    "programRoutines": [
                        {
                            "name": "'Elixir.MDEx.FragmentParser':close_html_tag/2"
                        },
                        {
                            "name": "'Elixir.MDEx.FragmentParser':continue_html_context/2"
                        },
                        {
                            "name": "'Elixir.MDEx':stream/2"
                        }
                    ],
                    "repo": "https://github.com/leandrocp/mdex",
                    "vendor": "leandrocp",
                    "versions": [
                        {
                            "lessThan": "0.15.0",
                            "status": "affected",
                            "version": "0.14.0",
                            "versionType": "semver"
                        }
                    ]
                },
                {
                    "collectionURL": "https://github.com",
                    "cpes": [
                        "cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:*"
                    ],
                    "defaultStatus": "unaffected",
                    "modules": [
                        "'Elixir.MDEx.FragmentParser'",
                        "'Elixir.MDEx'"
                    ],
                    "packageName": "leandrocp/mdex",
                    "packageURL": "pkg:github/leandrocp/mdex",
                    "product": "mdex",
                    "programFiles": [
                        "lib/mdex/fragment_parser.ex",
                        "lib/mdex.ex"
                    ],
                    "programRoutines": [
                        {
                            "name": "'Elixir.MDEx.FragmentParser':close_html_tag/2"
                        },
                        {
                            "name": "'Elixir.MDEx.FragmentParser':continue_html_context/2"
                        },
                        {
                            "name": "'Elixir.MDEx':stream/2"
                        }
                    ],
                    "repo": "https://github.com/leandrocp/mdex",
                    "vendor": "leandrocp",
                    "versions": [
                        {
                            "lessThan": "2c29b28cd0473c24347aa00b95d16f9ce5f9d9af",
                            "status": "affected",
                            "version": "a88793cb0fc5caf75bf878b92c64d36817824765",
                            "versionType": "git"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "cpeMatch": [
                                {
                                    "criteria": "cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:*",
                                    "versionEndExcluding": "0.15.0",
                                    "versionStartIncluding": "0.14.0",
                                    "vulnerable": true
                                }
                            ],
                            "negate": false,
                            "operator": "OR"
                        }
                    ],
                    "operator": "AND"
                }
            ],
            "credits": [
                {
                    "lang": "en",
                    "type": "finder",
                    "value": "Peter Ullrich"
                },
                {
                    "lang": "en",
                    "type": "reporter",
                    "value": "Peter Ullrich"
                },
                {
                    "lang": "en",
                    "type": "analyst",
                    "value": "Jonatan Männchen / EEF"
                },
                {
                    "lang": "en",
                    "type": "remediation developer",
                    "value": "Leandro Pereira"
                }
            ],
            "dateAssigned": "2026-11-30T16:56:08.000Z",
            "datePublic": "2026-11-30T18:43:09.000Z",
            "descriptions": [
                {
                    "lang": "en",
                    "supportingMedia": [
                        {
                            "base64": false,
                            "type": "text/html",
                            "value": "<p>Inefficient Algorithmic Complexity vulnerability in leandrocp mdex allows an attacker who controls Markdown passed to <code>MDEx.stream/2</code> to exhaust CPU via unmatched HTML closing tags.</p>\n<p><code>MDEx.stream/2</code> tracks open HTML tags with <code>MDEx.FragmentParser.continue_html_context/2</code> in <code>lib/mdex/fragment_parser.ex</code>. Every non-void opening tag is pushed onto an unbounded list, and <code>close_html_tag/2</code> scans the whole list for each closing tag. A closer with no matching opener leaves the list unchanged, so the next closer scans it again. An HTML block of N openers followed by N unmatched closers therefore costs O(N²), and about 270 KB of input keeps a scheduler busy for tens of seconds. The tracking runs on every HTML block and inline HTML literal regardless of the <code>auto_close</code> option and the render <code>unsafe</code> setting. <code>MDEx.to_html/1</code> and the other non-streaming entry points are not affected.</p>\n<p>This issue affects mdex: from 0.14.0 before 0.15.0.</p>"
                        },
                        {
                            "base64": false,
                            "type": "text/markdown",
                            "value": "Inefficient Algorithmic Complexity vulnerability in leandrocp mdex allows an attacker who controls Markdown passed to `MDEx.stream/2` to exhaust CPU via unmatched HTML closing tags.\n\n`MDEx.stream/2` tracks open HTML tags with `MDEx.FragmentParser.continue_html_context/2` in `lib/mdex/fragment_parser.ex`. Every non-void opening tag is pushed onto an unbounded list, and `close_html_tag/2` scans the whole list for each closing tag. A closer with no matching opener leaves the list unchanged, so the next closer scans it again. An HTML block of N openers followed by N unmatched closers therefore costs O(N²), and about 270 KB of input keeps a scheduler busy for tens of seconds. The tracking runs on every HTML block and inline HTML literal regardless of the `auto_close` option and the render `unsafe` setting. `MDEx.to_html/1` and the other non-streaming entry points are not affected.\n\nThis issue affects mdex: from 0.14.0 before 0.15.0."
                        }
                    ],
                    "value": "Inefficient Algorithmic Complexity vulnerability in leandrocp mdex allows an attacker who controls Markdown passed to MDEx.stream/2 to exhaust CPU via unmatched HTML closing tags.\n\nMDEx.stream/2 tracks open HTML tags with MDEx.FragmentParser.continue_html_context/2 in lib/mdex/fragment_parser.ex. Every non-void opening tag is pushed onto an unbounded list, and close_html_tag/2 scans the whole list for each closing tag. A closer with no matching opener leaves the list unchanged, so the next closer scans it again. An HTML block of N openers followed by N unmatched closers therefore costs O(N²), and about 270 KB of input keeps a scheduler busy for tens of seconds. The tracking runs on every HTML block and inline HTML literal regardless of the auto_close option and the render unsafe setting. MDEx.to_html/1 and the other non-streaming entry points are not affected.\n\nThis issue affects mdex: from 0.14.0 before 0.15.0."
                }
            ],
            "impacts": [
                {
                    "capecId": "CAPEC-130",
                    "descriptions": [
                        {
                            "lang": "en",
                            "supportingMedia": [
                                {
                                    "base64": false,
                                    "type": "text/html",
                                    "value": "<p>An attacker who can submit Markdown that an application renders with <code>MDEx.stream/2</code> can tie up a BEAM scheduler for tens of seconds per request, and a few concurrent requests stall the node.</p>"
                                },
                                {
                                    "base64": false,
                                    "type": "text/markdown",
                                    "value": "An attacker who can submit Markdown that an application renders with `MDEx.stream/2` can tie up a BEAM scheduler for tens of seconds per request, and a few concurrent requests stall the node."
                                }
                            ],
                            "value": "An attacker who can submit Markdown that an application renders with MDEx.stream/2 can tie up a BEAM scheduler for tens of seconds per request, and a few concurrent requests stall the node."
                        }
                    ]
                }
            ],
            "metrics": [
                {
                    "cvssV4_0": {
                        "Automatable": "NOT_DEFINED",
                        "Recovery": "NOT_DEFINED",
                        "Safety": "NOT_DEFINED",
                        "attackComplexity": "LOW",
                        "attackRequirements": "NONE",
                        "attackVector": "LOCAL",
                        "baseScore": 6.9,
                        "baseSeverity": "MEDIUM",
                        "privilegesRequired": "NONE",
                        "providerUrgency": "NOT_DEFINED",
                        "subAvailabilityImpact": "NONE",
                        "subConfidentialityImpact": "NONE",
                        "subIntegrityImpact": "NONE",
                        "userInteraction": "NONE",
                        "valueDensity": "NOT_DEFINED",
                        "vectorString": "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",
                        "version": "4.0",
                        "vulnAvailabilityImpact": "HIGH",
                        "vulnConfidentialityImpact": "NONE",
                        "vulnIntegrityImpact": "NONE",
                        "vulnerabilityResponseEffort": "NOT_DEFINED"
                    },
                    "format": "CVSS",
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "GENERAL"
                        }
                    ]
                }
            ],
            "problemTypes": [
                {
                    "descriptions": [
                        {
                            "cweId": "CWE-407",
                            "description": "CWE-407 Inefficient Algorithmic Complexity",
                            "lang": "en",
                            "type": "CWE"
                        }
                    ]
                }
            ],
            "providerMetadata": {
                "orgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
                "shortName": "EEF",
                "dateUpdated": "2026-11-30T18:43:11.147Z"
            },
            "references": [
                {
                    "name": "EEF CNA record for CVE-2026-134915",
                    "tags": [
                        "related",
                        "third-party-advisory"
                    ],
                    "url": "https://cna.erlef.org/cves/CVE-2026-134915.html"
                },
                {
                    "name": "OSV record EEF-CVE-2026-134915",
                    "tags": [
                        "related"
                    ],
                    "url": "https://osv.dev/vulnerability/EEF-CVE-2026-134915"
                },
                {
                    "name": "Introducing commit a88793c in leandrocp/mdex",
                    "tags": [
                        "related"
                    ],
                    "url": "https://github.com/leandrocp/mdex/commit/a88793cb0fc5caf75bf878b92c64d36817824765"
                },
                {
                    "name": "Fix commit 2c29b28 in leandrocp/mdex",
                    "tags": [
                        "patch"
                    ],
                    "url": "https://github.com/leandrocp/mdex/commit/2c29b28cd0473c24347aa00b95d16f9ce5f9d9af"
                }
            ],
            "source": {
                "discovery": "INTERNAL"
            },
            "title": "Quadratic HTML tag tracking in MDEx.stream/2 allows CPU exhaustion via unmatched closing tags",
            "x_proofOfConcept": [
                {
                    "lang": "en",
                    "supportingMedia": [
                        {
                            "base64": false,
                            "type": "text/html",
                            "value": "<ol>\n<li>Build a Markdown string of <code>&lt;div&gt;</code> repeated 30,000 times followed by <code>&lt;/b&gt;</code> repeated 30,000 times (270,000 bytes).</li>\n<li>Render it as one chunk with <code>MDEx.stream(auto_close: false)</code> and run the stream.</li>\n<li>Observe about 30 seconds of CPU on mdex 0.14.9, against a few milliseconds for <code>MDEx.to_html!/1</code> on the same input. Doubling the input roughly quadruples the time.</li>\n</ol>"
                        },
                        {
                            "base64": false,
                            "type": "text/markdown",
                            "value": "1. Build a Markdown string of `<div>` repeated 30,000 times followed by `</b>` repeated 30,000 times (270,000 bytes).\n2. Render it as one chunk with `MDEx.stream(auto_close: false)` and run the stream.\n3. Observe about 30 seconds of CPU on mdex 0.14.9, against a few milliseconds for `MDEx.to_html!/1` on the same input. Doubling the input roughly quadruples the time."
                        }
                    ],
                    "value": "* Build a Markdown string of <div> repeated 30,000 times followed by </b> repeated 30,000 times (270,000 bytes).\n* Render it as one chunk with MDEx.stream(auto_close: false) and run the stream.\n* Observe about 30 seconds of CPU on mdex 0.14.9, against a few milliseconds for MDEx.to_html!/1 on the same input. Doubling the input roughly quadruples the time."
                }
            ],
            "x_technicalAnalysis": [
                {
                    "lang": "en",
                    "supportingMedia": [
                        {
                            "base64": false,
                            "type": "text/html",
                            "value": "<p><strong>1. Reachability.</strong> <code>MDEx.stream/2</code> renders each chunk through <code>emit_stream_source</code>, <code>stream_source_blocks</code> and <code>stream_node_groups</code> in <code>lib/mdex.ex</code>. <code>stream_node_groups</code> calls <code>MDEx.FragmentParser.continue_html_context/2</code> on every parsed node, so every <code>HtmlBlock</code> and <code>HtmlInline</code> literal is scanned, whatever the <code>auto_close</code> and render <code>unsafe</code> settings are.</p>\n<p><strong>2. Unbounded stack.</strong> <code>scan_html</code> pushes every non-void, non-self-closing opening tag onto the context list with no size limit.</p>\n<p><strong>3. Quadratic scan.</strong> For each closing tag, <code>close_html_tag/2</code> runs <code>Enum.split_while/2</code> over the whole list. When no matching opener exists, it returns the list unchanged, so every following unmatched closer walks the full list again. N openers followed by N unmatched closers cost O(N²).</p>"
                        },
                        {
                            "base64": false,
                            "type": "text/markdown",
                            "value": "**1. Reachability.** `MDEx.stream/2` renders each chunk through `emit_stream_source`, `stream_source_blocks` and `stream_node_groups` in `lib/mdex.ex`. `stream_node_groups` calls `MDEx.FragmentParser.continue_html_context/2` on every parsed node, so every `HtmlBlock` and `HtmlInline` literal is scanned, whatever the `auto_close` and render `unsafe` settings are.\n\n**2. Unbounded stack.** `scan_html` pushes every non-void, non-self-closing opening tag onto the context list with no size limit.\n\n**3. Quadratic scan.** For each closing tag, `close_html_tag/2` runs `Enum.split_while/2` over the whole list. When no matching opener exists, it returns the list unchanged, so every following unmatched closer walks the full list again. N openers followed by N unmatched closers cost O(N²)."
                        }
                    ],
                    "value": "1. Reachability. MDEx.stream/2 renders each chunk through emit_stream_source, stream_source_blocks and stream_node_groups in lib/mdex.ex. stream_node_groups calls MDEx.FragmentParser.continue_html_context/2 on every parsed node, so every HtmlBlock and HtmlInline literal is scanned, whatever the auto_close and render unsafe settings are.\n\n2. Unbounded stack. scan_html pushes every non-void, non-self-closing opening tag onto the context list with no size limit.\n\n3. Quadratic scan. For each closing tag, close_html_tag/2 runs Enum.split_while/2 over the whole list. When no matching opener exists, it returns the list unchanged, so every following unmatched closer walks the full list again. N openers followed by N unmatched closers cost O(N²)."
                }
            ]
        },
        "adp": [
            {
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "timestamp": "2026-12-03T17:11:46.994447Z",
                                "id": "CVE-2026-134915",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "partial"
                                    }
                                ],
                                "role": "CISA Coordinator",
                                "version": "2.0.3"
                            }
                        }
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2026-12-03T18:13:26.736Z"
                }
            }
        ]
    }
}