{"id":"CVE-2026-137162","sourceIdentifier":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","published":"2026-11-30T19:17:55.303","lastModified":"2026-12-03T18:17:18.557","vulnStatus":"Received","cveTags":[],"descriptions":[{"lang":"en","value":"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.\n\nWhen 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.\n\nThis issue affects mdex: from 0.14.2 before 0.15.0."}],"affected":[{"source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","affectedData":[{"vendor":"leandrocp","product":"mdex","defaultStatus":"unaffected","collectionURL":"https://repo.hex.pm","packageName":"mdex","cpes":["cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:*"],"modules":["'Elixir.MDEx.FragmentParser'"],"programFiles":["lib/mdex/fragment_parser.ex"],"programRoutines":[{"name":"'Elixir.MDEx.FragmentParser':expand_quote_prefix/2"},{"name":"'Elixir.MDEx.FragmentParser':complete/2"}],"repo":"https://github.com/leandrocp/mdex","packageURL":"pkg:hex/mdex","versions":[{"version":"0.14.2","lessThan":"0.15.0","versionType":"semver","status":"affected"}]},{"vendor":"leandrocp","product":"mdex","defaultStatus":"unaffected","collectionURL":"https://github.com","packageName":"leandrocp/mdex","cpes":["cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:*"],"modules":["'Elixir.MDEx.FragmentParser'"],"programFiles":["lib/mdex/fragment_parser.ex"],"programRoutines":[{"name":"'Elixir.MDEx.FragmentParser':expand_quote_prefix/2"},{"name":"'Elixir.MDEx.FragmentParser':complete/2"}],"repo":"https://github.com/leandrocp/mdex","packageURL":"pkg:github/leandrocp/mdex","versions":[{"version":"9a4b76802bfcd12ba34337bf3cf7d62621d0fe92","lessThan":"2c29b28cd0473c24347aa00b95d16f9ce5f9d9af","versionType":"git","status":"affected"}]}]}],"metrics":{"cvssMetricV40":[{"source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","type":"Secondary","cvssData":{"version":"4.0","vectorString":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","baseScore":2.1,"baseSeverity":"LOW","attackVector":"LOCAL","attackComplexity":"LOW","attackRequirements":"PRESENT","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"NONE","vulnIntegrityImpact":"NONE","vulnAvailabilityImpact":"LOW","subConfidentialityImpact":"NONE","subIntegrityImpact":"NONE","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","confidentialityRequirement":"NOT_DEFINED","integrityRequirement":"NOT_DEFINED","availabilityRequirement":"NOT_DEFINED","modifiedAttackVector":"NOT_DEFINED","modifiedAttackComplexity":"NOT_DEFINED","modifiedAttackRequirements":"NOT_DEFINED","modifiedPrivilegesRequired":"NOT_DEFINED","modifiedUserInteraction":"NOT_DEFINED","modifiedVulnConfidentialityImpact":"NOT_DEFINED","modifiedVulnIntegrityImpact":"NOT_DEFINED","modifiedVulnAvailabilityImpact":"NOT_DEFINED","modifiedSubConfidentialityImpact":"NOT_DEFINED","modifiedSubIntegrityImpact":"NOT_DEFINED","modifiedSubAvailabilityImpact":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED"}}],"ssvcV203":[{"source":"134c704f-9b21-4f2e-91b3-4a467353bcc0","ssvcData":{"timestamp":"2026-12-03T17:11:50.362342Z","id":"CVE-2026-137162","options":[{"exploitation":"none"},{"automatable":"no"},{"technicalImpact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}]},"weaknesses":[{"source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db","type":"Secondary","description":[{"lang":"en","value":"CWE-407"}]}],"references":[{"url":"https://cna.erlef.org/cves/CVE-2026-137162.html","source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db"},{"url":"https://github.com/leandrocp/mdex/commit/2c29b28cd0473c24347aa00b95d16f9ce5f9d9af","source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db"},{"url":"https://github.com/leandrocp/mdex/commit/9a4b76802bfcd12ba34337bf3cf7d62621d0fe92","source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db"},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-137162","source":"6b3ad84c-e1a6-4bf7-a703-f496b71e49db"}]}