{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-135775",
        "assignerOrgId": "6b3ad84c-e1a6-4bf7-a703-f496b71e49db",
        "state": "PUBLISHED",
        "assignerShortName": "EEF",
        "dateReserved": "2026-11-30T08:50:03.708Z",
        "datePublished": "2026-11-30T18:45:07.891Z",
        "dateUpdated": "2026-11-30T18:59:54.741Z"
    },
    "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':autolink_size/2"
                        },
                        {
                            "name": "'Elixir.MDEx.FragmentParser':autolink_text/1"
                        },
                        {
                            "name": "'Elixir.MDEx.FragmentParser':complete/2"
                        },
                        {
                            "name": "'Elixir.MDEx.FragmentParser':complete_with_state/3"
                        },
                        {
                            "name": "'Elixir.MDEx':stream/2"
                        },
                        {
                            "name": "'Elixir.MDEx':to_html/2"
                        }
                    ],
                    "repo": "https://github.com/leandrocp/mdex",
                    "vendor": "leandrocp",
                    "versions": [
                        {
                            "lessThan": "0.15.0",
                            "status": "affected",
                            "version": "0.14.2",
                            "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':autolink_size/2"
                        },
                        {
                            "name": "'Elixir.MDEx.FragmentParser':autolink_text/1"
                        },
                        {
                            "name": "'Elixir.MDEx.FragmentParser':complete/2"
                        },
                        {
                            "name": "'Elixir.MDEx.FragmentParser':complete_with_state/3"
                        },
                        {
                            "name": "'Elixir.MDEx':stream/2"
                        },
                        {
                            "name": "'Elixir.MDEx':to_html/2"
                        }
                    ],
                    "repo": "https://github.com/leandrocp/mdex",
                    "vendor": "leandrocp",
                    "versions": [
                        {
                            "lessThan": "2c29b28cd0473c24347aa00b95d16f9ce5f9d9af",
                            "status": "affected",
                            "version": "bea359152bc1f63f3256ee86ca207151b815940d",
                            "versionType": "git"
                        }
                    ]
                }
            ],
            "configurations": [
                {
                    "lang": "en",
                    "supportingMedia": [
                        {
                            "base64": false,
                            "type": "text/html",
                            "value": "<p>The vulnerable code runs only when auto-close is active: in <code>MDEx.stream/2</code>, where <code>auto_close</code> defaults to <code>true</code>; in <code>MDEx.to_html/2</code> and the other renderers when called with <code>auto_close: true</code>; and in <code>MDEx.Document</code> streaming buffers with <code>auto_close</code> set. Rendering with the default options of <code>MDEx.to_html/2</code> does not reach it.</p>"
                        },
                        {
                            "base64": false,
                            "type": "text/markdown",
                            "value": "The vulnerable code runs only when auto-close is active: in `MDEx.stream/2`, where `auto_close` defaults to `true`; in `MDEx.to_html/2` and the other renderers when called with `auto_close: true`; and in `MDEx.Document` streaming buffers with `auto_close` set. Rendering with the default options of `MDEx.to_html/2` does not reach it."
                        }
                    ],
                    "value": "The vulnerable code runs only when auto-close is active: in MDEx.stream/2, where auto_close defaults to true; in MDEx.to_html/2 and the other renderers when called with auto_close: true; and in MDEx.Document streaming buffers with auto_close set. Rendering with the default options of MDEx.to_html/2 does not reach it."
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "cpeMatch": [
                                {
                                    "criteria": "cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:*",
                                    "versionEndExcluding": "0.15.0",
                                    "versionStartIncluding": "0.14.2",
                                    "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:55:38.000Z",
            "datePublic": "2026-11-30T18:45:06.000Z",
            "descriptions": [
                {
                    "lang": "en",
                    "supportingMedia": [
                        {
                            "base64": false,
                            "type": "text/html",
                            "value": "<p>Inefficient Algorithmic Complexity vulnerability in leandrocp mdex allows an attacker who controls rendered Markdown to cause a denial of service via a bare URL followed by many closing parentheses.</p>\n<p>When auto-close is active, <code>MDEx.FragmentParser.autolink_size/2</code> in <code>lib/mdex/fragment_parser.ex</code> trims trailing <code>)</code> from a bare URL one byte at a time and recounts every <code>(</code> and <code>)</code> in the remaining URL at each step, so a URL followed by N parentheses costs O(N²) work. Around 20 KB of input pins a scheduler for tens of seconds, and <code>MDEx.stream/2</code> repeats the completion over the whole accumulated source for every chunk. No extension needs to be enabled. Rendering with auto-close disabled is not affected.</p>\n<p>This issue affects mdex: from 0.14.2 before 0.15.0.</p>"
                        },
                        {
                            "base64": false,
                            "type": "text/markdown",
                            "value": "Inefficient Algorithmic Complexity vulnerability in leandrocp mdex allows an attacker who controls rendered Markdown to cause a denial of service via a bare URL followed by many closing parentheses.\n\nWhen auto-close is active, `MDEx.FragmentParser.autolink_size/2` in `lib/mdex/fragment_parser.ex` trims trailing `)` from a bare URL one byte at a time and recounts every `(` and `)` in the remaining URL at each step, so a URL followed by N parentheses costs O(N²) work. Around 20 KB of input pins a scheduler for tens of seconds, and `MDEx.stream/2` repeats the completion over the whole accumulated source for every chunk. No extension needs to be enabled. Rendering with auto-close disabled is not affected.\n\nThis issue affects mdex: from 0.14.2 before 0.15.0."
                        }
                    ],
                    "value": "Inefficient Algorithmic Complexity vulnerability in leandrocp mdex allows an attacker who controls rendered Markdown to cause a denial of service via a bare URL followed by many closing parentheses.\n\nWhen auto-close is active, MDEx.FragmentParser.autolink_size/2 in lib/mdex/fragment_parser.ex trims trailing ) from a bare URL one byte at a time and recounts every ( and ) in the remaining URL at each step, so a URL followed by N parentheses costs O(N²) work. Around 20 KB of input pins a scheduler for tens of seconds, and MDEx.stream/2 repeats the completion over the whole accumulated source for every chunk. No extension needs to be enabled. Rendering with auto-close disabled is not affected.\n\nThis issue affects mdex: from 0.14.2 before 0.15.0."
                }
            ],
            "impacts": [
                {
                    "capecId": "CAPEC-130",
                    "descriptions": [
                        {
                            "lang": "en",
                            "supportingMedia": [
                                {
                                    "base64": false,
                                    "type": "text/html",
                                    "value": "<p>An attacker who can supply Markdown, or steer LLM output, that an application renders with auto-close can pin BEAM schedulers with a few kilobytes of input per request, delaying or denying service to every other user of the node.</p>"
                                },
                                {
                                    "base64": false,
                                    "type": "text/markdown",
                                    "value": "An attacker who can supply Markdown, or steer LLM output, that an application renders with auto-close can pin BEAM schedulers with a few kilobytes of input per request, delaying or denying service to every other user of the node."
                                }
                            ],
                            "value": "An attacker who can supply Markdown, or steer LLM output, that an application renders with auto-close can pin BEAM schedulers with a few kilobytes of input per request, delaying or denying service to every other user of the node."
                        }
                    ]
                }
            ],
            "metrics": [
                {
                    "cvssV4_0": {
                        "Automatable": "NOT_DEFINED",
                        "Recovery": "NOT_DEFINED",
                        "Safety": "NOT_DEFINED",
                        "attackComplexity": "LOW",
                        "attackRequirements": "PRESENT",
                        "attackVector": "LOCAL",
                        "baseScore": 5.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:P/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:45:07.891Z"
            },
            "references": [
                {
                    "name": "EEF CNA record for CVE-2026-135775",
                    "tags": [
                        "related",
                        "third-party-advisory"
                    ],
                    "url": "https://cna.erlef.org/cves/CVE-2026-135775.html"
                },
                {
                    "name": "OSV record EEF-CVE-2026-135775",
                    "tags": [
                        "related"
                    ],
                    "url": "https://osv.dev/vulnerability/EEF-CVE-2026-135775"
                },
                {
                    "name": "Introducing commit bea3591 in leandrocp/mdex",
                    "tags": [
                        "related"
                    ],
                    "url": "https://github.com/leandrocp/mdex/commit/bea359152bc1f63f3256ee86ca207151b815940d"
                },
                {
                    "name": "Fix commit 2c29b28 in leandrocp/mdex",
                    "tags": [
                        "patch"
                    ],
                    "url": "https://github.com/leandrocp/mdex/commit/2c29b28cd0473c24347aa00b95d16f9ce5f9d9af"
                }
            ],
            "source": {
                "discovery": "INTERNAL"
            },
            "title": "Quadratic CPU consumption in mdex auto-close trimming of trailing parentheses after bare URLs",
            "workarounds": [
                {
                    "lang": "en",
                    "supportingMedia": [
                        {
                            "base64": false,
                            "type": "text/html",
                            "value": "<p>Render untrusted Markdown with auto-close disabled: pass <code>auto_close: false</code> to <code>MDEx.stream/2</code>, and do not pass <code>auto_close: true</code> to <code>MDEx.to_html/2</code> or the other renderers.</p>"
                        },
                        {
                            "base64": false,
                            "type": "text/markdown",
                            "value": "Render untrusted Markdown with auto-close disabled: pass `auto_close: false` to `MDEx.stream/2`, and do not pass `auto_close: true` to `MDEx.to_html/2` or the other renderers."
                        }
                    ],
                    "value": "Render untrusted Markdown with auto-close disabled: pass auto_close: false to MDEx.stream/2, and do not pass auto_close: true to MDEx.to_html/2 or the other renderers."
                }
            ],
            "x_proofOfConcept": [
                {
                    "lang": "en",
                    "supportingMedia": [
                        {
                            "base64": false,
                            "type": "text/html",
                            "value": "<ol>\n<li>Build the input <code>\"http://x\"</code> followed by 15,000 <code>)</code> characters (about 15 KB).</li>\n<li>Render it with <code>MDEx.to_html!(markdown)</code>: it completes in a few milliseconds.</li>\n<li>Render the same input with <code>MDEx.to_html!(markdown, auto_close: true)</code>, or pass it as a single chunk to <code>MDEx.stream/2</code>: rendering takes tens of seconds and holds a scheduler for the whole time.</li>\n<li>Doubling the number of parentheses roughly quadruples the time.</li>\n</ol>"
                        },
                        {
                            "base64": false,
                            "type": "text/markdown",
                            "value": "1. Build the input `\"http://x\"` followed by 15,000 `)` characters (about 15 KB).\n2. Render it with `MDEx.to_html!(markdown)`: it completes in a few milliseconds.\n3. Render the same input with `MDEx.to_html!(markdown, auto_close: true)`, or pass it as a single chunk to `MDEx.stream/2`: rendering takes tens of seconds and holds a scheduler for the whole time.\n4. Doubling the number of parentheses roughly quadruples the time."
                        }
                    ],
                    "value": "* Build the input \"http://x\" followed by 15,000 ) characters (about 15 KB).\n* Render it with MDEx.to_html!(markdown): it completes in a few milliseconds.\n* Render the same input with MDEx.to_html!(markdown, auto_close: true), or pass it as a single chunk to MDEx.stream/2: rendering takes tens of seconds and holds a scheduler for the whole time.\n* Doubling the number of parentheses roughly quadruples the time."
                }
            ],
            "x_technicalAnalysis": [
                {
                    "lang": "en",
                    "supportingMedia": [
                        {
                            "base64": false,
                            "type": "text/html",
                            "value": "<p><strong>1. Reaching the trimmer.</strong> With auto-close active, <code>MDEx.FragmentParser.complete/2</code> runs <code>complete_inline/3</code>, which calls <code>unmatched_suffix/1</code>. That masks bare URLs through <code>mask_urls/1</code> and <code>mask_url_spans/4</code>, and each URL span is measured with <code>autolink_text/1</code>. No extension needs to be enabled.</p>\n<p><strong>2. Quadratic trim.</strong> <code>autolink_size/2</code> walks back from the end of the URL candidate. For every trailing <code>)</code> it takes the remaining prefix, counts all <code>(</code> and all <code>)</code> in it with <code>count_char/2</code>, and if closers outnumber openers it drops one byte and recurses. A URL followed by N <code>)</code> therefore performs N full scans of a string of length up to N, which is O(N²).</p>\n<p><strong>3. Amplification.</strong> <code>MDEx.stream/2</code> re-runs completion over the whole accumulated source for every chunk, so a payload delivered over many chunks multiplies the cost. None of the entry points limits input size.</p>"
                        },
                        {
                            "base64": false,
                            "type": "text/markdown",
                            "value": "**1. Reaching the trimmer.** With auto-close active, `MDEx.FragmentParser.complete/2` runs `complete_inline/3`, which calls `unmatched_suffix/1`. That masks bare URLs through `mask_urls/1` and `mask_url_spans/4`, and each URL span is measured with `autolink_text/1`. No extension needs to be enabled.\n\n**2. Quadratic trim.** `autolink_size/2` walks back from the end of the URL candidate. For every trailing `)` it takes the remaining prefix, counts all `(` and all `)` in it with `count_char/2`, and if closers outnumber openers it drops one byte and recurses. A URL followed by N `)` therefore performs N full scans of a string of length up to N, which is O(N²).\n\n**3. Amplification.** `MDEx.stream/2` re-runs completion over the whole accumulated source for every chunk, so a payload delivered over many chunks multiplies the cost. None of the entry points limits input size."
                        }
                    ],
                    "value": "1. Reaching the trimmer. With auto-close active, MDEx.FragmentParser.complete/2 runs complete_inline/3, which calls unmatched_suffix/1. That masks bare URLs through mask_urls/1 and mask_url_spans/4, and each URL span is measured with autolink_text/1. No extension needs to be enabled.\n\n2. Quadratic trim. autolink_size/2 walks back from the end of the URL candidate. For every trailing ) it takes the remaining prefix, counts all ( and all ) in it with count_char/2, and if closers outnumber openers it drops one byte and recurses. A URL followed by N ) therefore performs N full scans of a string of length up to N, which is O(N²).\n\n3. Amplification. MDEx.stream/2 re-runs completion over the whole accumulated source for every chunk, so a payload delivered over many chunks multiplies the cost. None of the entry points limits input size."
                }
            ]
        },
        "adp": [
            {
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "timestamp": "2026-11-30T18:59:42.936491Z",
                                "id": "CVE-2026-135775",
                                "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-11-30T18:59:54.741Z"
                }
            }
        ]
    }
}