{"id":"CVE-2026-136129","aliases":["CVE-2026-136129","EEF-CVE-2026-136129"],"related":[],"kind":"vulnerability","state":"published","title":"Dangerous URL filter bypass via control characters in MDEx Quill Delta output (XSS)","summary":"Incorrect Behavior Order: Validate Before Canonicalize vulnerability in leandrocp mdex allows an attacker who controls Markdown input to place javascript: and data: URLs into Quill Delta output via entity-encoded control characters.\n\nMDEx.to_delta/2 blanks link, wikilink and image URLs that its dangerous-URL check flags, but render_url/2 in lib/mdex/delta_converter.ex runs that prefix check on the entity-decoded URL without first normalizing it as a browser would. A destination such as java&#9;script:alert(1) reaches the check with a tab inside the scheme, passes, and is emitted unchanged. Browsers remove tab, carriage return and line feed and trim leading C0 control characters and spaces when parsing a URL, so the value runs as javascript:. Only applications that place the Delta link or image value into an href or src without their own URL check are exposed. Stock Quill re-sanitizes link protocols and is not affected.\n\nThis issue affects mdex: from 0.13.2 before 0.15.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Incorrect Behavior Order: Validate Before Canonicalize vulnerability in leandrocp mdex allows an attacker who controls Markdown input to place javascript: and data: URLs into Quill Delta output via entity-encoded control characters.\n\nMDEx.to_delta/2 blanks link, wikilink and image URLs that its dangerous-URL check flags, but render_url/2 in lib/mdex/delta_converter.ex runs that prefix check on the entity-decoded URL without first normalizing it as a browser would. A destination such as java&#9;script:alert(1) reaches the check with a tab inside the scheme, passes, and is emitted unchanged. Browsers remove tab, carriage return and line feed and trim leading C0 control characters and spaces when parsing a URL, so the value runs as javascript:. Only applications that place the Delta link or image value into an href or src without their own URL check are exposed. Stock Quill re-sanitizes link protocols and is not affected.\n\nThis issue affects mdex: from 0.13.2 before 0.15.0.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nIncorrect Behavior Order: Validate Before Canonicalize vulnerability in leandrocp mdex allows an attacker who controls Markdown input to place `javascript:` and `data:` URLs into Quill Delta output via entity-encoded control characters.\n\n`MDEx.to_delta/2` blanks link, wikilink and image URLs that its dangerous-URL check flags, but `render_url/2` in `lib/mdex/delta_converter.ex` runs that prefix check on the entity-decoded URL without first normalizing it as a browser would. A destination such as `java&#9;script:alert(1)` reaches the check with a tab inside the scheme, passes, and is emitted unchanged. Browsers remove tab, carriage return and line feed and trim leading C0 control characters and spaces when parsing a URL, so the value runs as `javascript:`. Only applications that place the Delta `link` or `image` value into an `href` or `src` without their own URL check are exposed. Stock Quill re-sanitizes link protocols and is not affected.\n\nThis issue affects mdex: from 0.13.2 before 0.15.0.\n\n## Details\n\n**1. Entity decoding.** Comrak decodes HTML entities in link and image destinations while parsing, so `java&#9;script:alert(1)` becomes the URL `java`, a tab, `script:alert(1)`. The `&Tab;` and `&NewLine;` named entities, a leading `&#1;` or `&#32;`, `data&#9;:` and reference-style definitions behave the same way.\n\n**2. Unnormalized check.** `render_url/2` in `lib/mdex/delta_converter.ex` asks `MDExNative.Comrak.dangerous_url?/1` whether the URL is dangerous. That function is a plain prefix match on `javascript:`, `vbscript:`, `file:` and `data:`, so the decoded value does not match and is returned unchanged. A plain `javascript:` URL is still blanked.\n\n**3. Emission.** The Link, Image and WikiLink clauses of `default_convert_node/3` write the value into the Delta `link` or `image` attribute. The HTML renderer is not affected because it also percent-encodes URLs; the Delta path has no such step.\n\n**4. Browser normalization.** WHATWG URL parsing strips ASCII tab, line feed and carriage return anywhere and trims leading C0 controls and spaces, so a consumer that writes the value into `href` produces a working `javascript:` link.\n\n## Proof of concept\n\n1. Convert `[plain](javascript:alert(1)) [tab](java&#9;script:alert(1)) ![img](java&#10;script:alert(2)) [lead](&#1;javascript:alert(3))` with `MDEx.to_delta/2` and default options.\n2. Observe that the `plain` link is emitted as an empty string, while the other three are emitted as `java\\tscript:alert(1)`, `java\\nscript:alert(2)` and a value starting with byte 1 followed by `javascript:alert(3)`.\n3. Place the `tab` link value into an `<a href>` and click it: the browser strips the tab and runs `javascript:alert(1)`.\n\n## Impact\n\nAn attacker who can submit Markdown gets a stored `javascript:` or `data:` link into the Delta output, which runs script in the browser of a user who clicks it in an application that renders the Delta without its own URL check.\n\n## Configurations\n\nThe application must pass untrusted Markdown to `MDEx.to_delta/2` without the `unsafe` option and render the resulting Delta with a consumer (for example a custom Delta to HTML renderer or a non-Quill editor) that maps the `link` and `image` values to `href` and `src` without applying its own URL scheme check.","format":"markdown","source":"eef"}],"published":"2026-11-30T18:44:40.706Z","modified":"2026-11-30T19:17:51.277Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","score":2.1,"rating":"LOW"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","score":2.1,"rating":"LOW"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N"}],"cwes":["CWE-180"],"affected":[{"ranges":[{"type":"semver","introduced":"0.13.2","fixed":"0.15.0","status":"affected"}],"vendor":"leandrocp","product":"mdex","package":"mdex","cpe":"cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:*","repo":"https://github.com/leandrocp/mdex","source":"cvelist"},{"ranges":[{"type":"git","introduced":"2817147f5b87ce7186aa604c9ee72499485b8f2f","fixed":"75e735a26859f93c36f10d17a3119f856fe69009","status":"affected"}],"vendor":"leandrocp","product":"mdex","package":"leandrocp/mdex","cpe":"cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:*","repo":"https://github.com/leandrocp/mdex","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.13.2","status":"affected","fixed":"0.15.0"}],"ecosystem":"Hex","package":"mdex","purl":"pkg:hex/mdex","source":"eef"},{"ranges":[{"type":"git","introduced":"2817147f5b87ce7186aa604c9ee72499485b8f2f","status":"affected","fixed":"75e735a26859f93c36f10d17a3119f856fe69009"}],"repo":"https://github.com/leandrocp/mdex","source":"eef"}],"references":[{"url":"https://cna.erlef.org/cves/CVE-2026-136129.html","tags":["related","third-party-advisory","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-136129","tags":["related"],"sources":["cvelist","nvd"]},{"url":"https://github.com/leandrocp/mdex/commit/2817147f5b87ce7186aa604c9ee72499485b8f2f","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/leandrocp/mdex/commit/75e735a26859f93c36f10d17a3119f856fe69009","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]},{"url":"https://hex.pm/packages/mdex","tags":["package"],"sources":["eef"]}],"credits":["Peter Ullrich","Jonatan Männchen / EEF","Leandro Pereira"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-30T19:00:37.785Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-136129","url":"https://www.cve.org/CVERecord?id=CVE-2026-136129","licence":"CVE Terms of Use","modified":"2026-11-30T19:00:46.220Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-136129","url":"https://osv.dev/vulnerability/EEF-CVE-2026-136129","licence":"CC-BY-4.0","modified":"2026-11-30T18:45:05.761Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-136129","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-136129","licence":"Public domain","modified":"2026-11-30T19:17:51.277Z"}],"updatedAt":"2026-11-30T19:32:14.778Z","epss":{"score":0.00868,"percentile":0.59821,"date":"2026-12-01T12:00:22.000Z"}}