2.1low
Dangerous URL filter bypass via control characters in MDEx Quill Delta output (XSS)
- Severity
- 2.1low CVSS:4.0 by EEF
- Exploit likelihood
- 0.87% (higher than 59% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- EEF
- Also known as
- EEF-CVE-2026-136129
Description
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. 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	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. This issue affects mdex: from 0.13.2 before 0.15.0.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| mdex | from 0.13.2 before 0.15.0 | CVE List |
| leandrocp/mdex | from 2817147f5b87ce7186aa604c9ee72499485b8f2f before 75e735a26859f93c36f10d17a3119f856fe69009 | CVE List |
| mdex (Hex) | from 0.13.2 before 0.15.0 | Erlang Ecosystem Foundation |
| https://github.com/leandrocp/mdex | from 2817147f5b87ce7186aa604c9ee72499485b8f2f before 75e735a26859f93c36f10d17a3119f856fe69009 | Erlang Ecosystem Foundation |
All scores
| EEF | 2.1low CVSS:4.0 | 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 |
| Erlang Ecosystem Foundation | Not scored CVSS:4.0 | 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 |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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. 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	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. This issue affects mdex: from 0.13.2 before 0.15.0.
Erlang Ecosystem Foundation
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.
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	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.
This issue affects mdex: from 0.13.2 before 0.15.0.
Details
1. Entity decoding. Comrak decodes HTML entities in link and image destinations while parsing, so java	script:alert(1) becomes the URL java, a tab, script:alert(1). The 	 and 
 named entities, a leading  or  , data	: and reference-style definitions behave the same way.
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.
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.
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.
Proof of concept
- Convert
[plain](javascript:alert(1)) [tab](java	script:alert(1)) ) [lead](javascript:alert(3))withMDEx.to_delta/2and default options. - Observe that the
plainlink is emitted as an empty string, while the other three are emitted asjava\tscript:alert(1),java\nscript:alert(2)and a value starting with byte 1 followed byjavascript:alert(3). - Place the
tablink value into an<a href>and click it: the browser strips the tab and runsjavascript:alert(1).
Impact
An 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.
Configurations
The 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.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-136129 changed 2026-11-30 | CVE Terms of Use |
| Erlang Ecosystem Foundation | EEF-CVE-2026-136129 changed 2026-11-30 | CC-BY-4.0 |
| NVD | CVE-2026-136129 changed 2026-11-30 | Public domain |