{"id":"CVE-2026-54889","aliases":["EEF-CVE-2026-54889","EUVD-2026-40178","GHSA-4383-7xfp-gpph"],"status":"published","title":"Unsanitized URL schemes in MDEx Quill Delta output allow javascript: injection (XSS)","description":"Improper Neutralization of Input During Web Page Generation (XSS) vulnerability in leandrocp mdex allows cross-site scripting via unsanitized URL schemes in Quill Delta output.\n\n'Elixir.MDEx':to_delta/2 converts Markdown into a Quill Delta. 'Elixir.MDEx.DeltaConverter':default_convert_node/3 in lib/mdex/delta_converter.ex copies the URL of a link, wikilink, or image node directly from the parsed Markdown into the Delta \"link\" or \"image\" attribute without applying a scheme allowlist or any normalization.\n\nAn attacker who controls the Markdown text can supply a javascript: URL (for example [click](javascript:alert(document.cookie))) that survives verbatim into the Delta attribute. When the Delta is rendered to HTML by a downstream renderer (such as quill-delta-to-html or the Quill client), the attribute becomes an \u003ca href\u003e or \u003cimg src\u003e, and the javascript: scheme executes in the browser of anyone who views the rendered content. The link and wikilink cases are the strongest vectors because javascript: in an href executes on click; the image case is lower impact because javascript: in \u003cimg src\u003e generally does not execute in modern browsers.\n\nThis issue affects mdex: from 0.8.3 before 0.13.2.","severity":{"version":"4.0","score":5.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00393,"percentile":0.33781,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2026-06-29T19:10:49Z","modified":"2026-10-28T02:30:30Z","fixes":[{"ecosystem":"Hex","package":"mdex","fixed_in":["0.13.2"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Hex","package":"mdex","ranges":[{"type":"SEMVER","events":[{"introduced":"0.8.3"},{"fixed":"0.13.2"}]}],"versions":["0.10.0","0.11.0","0.11.1","0.11.2","0.11.3","0.11.4","0.11.5","0.11.6","0.11.7","0.12.0","0.12.1","0.12.2","0.12.3","0.12.4","0.12.5","0.13.0","0.13.1","0.8.3","0.8.4","0.8.5","0.8.6","0.9.0","0.9.1","0.9.2","0.9.3","0.9.4"]}],"products":[{"vendor":"leandrocp","product":"mdex"}],"references":[{"url":"https://github.com/leandrocp/mdex/security/advisories/GHSA-4383-7xfp-gpph","tags":["vendor-advisory","related","exploit","advisory"]},{"url":"https://cna.erlef.org/cves/CVE-2026-54889.html","tags":["related","web"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-54889","tags":["related","web"]},{"url":"https://github.com/leandrocp/mdex/commit/2817147f5b87ce7186aa604c9ee72499485b8f2f","tags":["patch","fix"]},{"url":"https://github.com","tags":["web"]},{"url":"https://repo.hex.pm","tags":["web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54889.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54889","tags":["advisory"]},{"url":"https://github.com/leandrocp/mdex","tags":["package"]},{"url":"https://hex.pm/packages/mdex","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-54889","title":"Unsanitized URL schemes in MDEx Quill Delta output allow javascript: injection (XSS)","description":"Improper Neutralization of Input During Web Page Generation (XSS) vulnerability in leandrocp mdex allows cross-site scripting via unsanitized URL schemes in Quill Delta output.\n\n'Elixir.MDEx':to_delta/2 converts Markdown into a Quill Delta. 'Elixir.MDEx.DeltaConverter':default_convert_node/3 in lib/mdex/delta_converter.ex copies the URL of a link, wikilink, or image node directly from the parsed Markdown into the Delta \"link\" or \"image\" attribute without applying a scheme allowlist or any normalization.\n\nAn attacker who controls the Markdown text can supply a javascript: URL (for example [click](javascript:alert(document.cookie))) that survives verbatim into the Delta attribute. When the Delta is rendered to HTML by a downstream renderer (such as quill-delta-to-html or the Quill client), the attribute becomes an \u003ca href\u003e or \u003cimg src\u003e, and the javascript: scheme executes in the browser of anyone who views the rendered content. The link and wikilink cases are the strongest vectors because javascript: in an href executes on click; the image case is lower impact because javascript: in \u003cimg src\u003e generally does not execute in modern browsers.\n\nThis issue affects mdex: from 0.8.3 before 0.13.2.","status":"published","published":"2026-06-29T19:10:49.841Z","modified":"2026-06-30T04:38:42.158Z","cvss":[{"version":"4.0","score":5.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N","level":"medium","assessor":"cna"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T13:38:09.774038Z"}],"euvd":[{"id":"EUVD-2026-40178","description":"Improper Neutralization of Input During Web Page Generation (XSS) vulnerability in leandrocp mdex allows cross-site scripting via unsanitized URL schemes in Quill Delta output.\n\n'Elixir.MDEx':to_delta/2 converts Markdown into a Quill Delta. 'Elixir.MDEx.DeltaConverter':default_convert_node/3 in lib/mdex/delta_converter.ex copies the URL of a link, wikilink, or image node directly from the parsed Markdown into the Delta \"link\" or \"image\" attribute without applying a scheme allowlist or any normalization.\n\nAn attacker who controls the Markdown text can supply a javascript: URL (for example [click](javascript:alert(document.cookie))) that survives verbatim into the Delta attribute. When the Delta is rendered to HTML by a downstream renderer (such as quill-delta-to-html or the Quill client), the attribute becomes an \u003ca href\u003e or \u003cimg src\u003e, and the javascript: scheme executes in the browser of anyone who views the rendered content. The link and wikilink cases are the strongest vectors because javascript: in an href executes on click; the image case is lower impact because javascript: in \u003cimg src\u003e generally does not execute in modern browsers.\n\nThis issue affects mdex: from 0.8.3 before 0.13.2.","status":"published","published":"2026-06-29T19:10:49Z","modified":"2026-06-30T04:38:42Z","cvss":[{"version":"4.0","score":5.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N","level":"medium"}],"updated_at":"2026-11-02T18:20:22.124605Z"}],"nvd":[{"id":"CVE-2026-54889","description":"Improper Neutralization of Input During Web Page Generation (XSS) vulnerability in leandrocp mdex allows cross-site scripting via unsanitized URL schemes in Quill Delta output.\n\n'Elixir.MDEx':to_delta/2 converts Markdown into a Quill Delta. 'Elixir.MDEx.DeltaConverter':default_convert_node/3 in lib/mdex/delta_converter.ex copies the URL of a link, wikilink, or image node directly from the parsed Markdown into the Delta \"link\" or \"image\" attribute without applying a scheme allowlist or any normalization.\n\nAn attacker who controls the Markdown text can supply a javascript: URL (for example [click](javascript:alert(document.cookie))) that survives verbatim into the Delta attribute. When the Delta is rendered to HTML by a downstream renderer (such as quill-delta-to-html or the Quill client), the attribute becomes an \u003ca href\u003e or \u003cimg src\u003e, and the javascript: scheme executes in the browser of anyone who views the rendered content. The link and wikilink cases are the strongest vectors because javascript: in an href executes on click; the image case is lower impact because javascript: in \u003cimg src\u003e generally does not execute in modern browsers.\n\nThis issue affects mdex: from 0.8.3 before 0.13.2.","status":"published","published":"2026-06-29T20:17:39.407Z","modified":"2026-10-25T21:10:00.77Z","cvss":[{"version":"4.0","score":5.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/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","level":"medium","assessor":"secondary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:12:26.508751Z"}],"osv":[{"id":"CVE-2026-54889","title":"Unsanitized URL schemes in MDEx Quill Delta output allow javascript: injection (XSS)","description":"Improper Neutralization of Input During Web Page Generation (XSS) vulnerability in leandrocp mdex allows cross-site scripting via unsanitized URL schemes in Quill Delta output.\n\n'Elixir.MDEx':to_delta/2 converts Markdown into a Quill Delta. 'Elixir.MDEx.DeltaConverter':default_convert_node/3 in lib/mdex/delta_converter.ex copies the URL of a link, wikilink, or image node directly from the parsed Markdown into the Delta \"link\" or \"image\" attribute without applying a scheme allowlist or any normalization.\n\nAn attacker who controls the Markdown text can supply a javascript: URL (for example [click](javascript:alert(document.cookie))) that survives verbatim into the Delta attribute. When the Delta is rendered to HTML by a downstream renderer (such as quill-delta-to-html or the Quill client), the attribute becomes an \u003ca href\u003e or \u003cimg src\u003e, and the javascript: scheme executes in the browser of anyone who views the rendered content. The link and wikilink cases are the strongest vectors because javascript: in an href executes on click; the image case is lower impact because javascript: in \u003cimg src\u003e generally does not execute in modern browsers.\n\nThis issue affects mdex: from 0.8.3 before 0.13.2.","status":"published","published":"2026-06-29T19:10:49.841Z","modified":"2026-10-28T02:30:30.943726155Z","cvss":[{"version":"4.0","score":5.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:45:10.818486Z"},{"id":"EEF-CVE-2026-54889","title":"Unsanitized URL schemes in MDEx Quill Delta output allow javascript: injection (XSS)","description":"## Summary\n\nImproper Neutralization of Input During Web Page Generation (XSS) vulnerability in leandrocp mdex allows cross-site scripting via unsanitized URL schemes in Quill Delta output.\n\n'Elixir.MDEx':to\\_delta/2 converts Markdown into a Quill Delta. 'Elixir.MDEx.DeltaConverter':default\\_convert\\_node/3 in lib/mdex/delta\\_converter.ex copies the URL of a link, wikilink, or image node directly from the parsed Markdown into the Delta \"link\" or \"image\" attribute without applying a scheme allowlist or any normalization.\n\nAn attacker who controls the Markdown text can supply a javascript: URL (for example \\[click\\](javascript:alert(document.cookie))) that survives verbatim into the Delta attribute. When the Delta is rendered to HTML by a downstream renderer (such as quill-delta-to-html or the Quill client), the attribute becomes an \u003ca href\u003e or \u003cimg src\u003e, and the javascript: scheme executes in the browser of anyone who views the rendered content. The link and wikilink cases are the strongest vectors because javascript: in an href executes on click; the image case is lower impact because javascript: in \u003cimg src\u003e generally does not execute in modern browsers.\n\nThis issue affects mdex: from 0.8.3 before 0.13.2.\n\n## Workarounds\n\nSanitize the Quill Delta produced by 'Elixir.MDEx':to\\_delta/2 before rendering it: drop or blank any \"link\" or \"image\" value whose URL scheme is not in a safe allowlist (http, https, mailto, tel).\n\n## Configurations\n\nThe application must pass untrusted Markdown to 'Elixir.MDEx':to\\_delta/2 and then render the resulting Quill Delta to HTML with a renderer that maps the \"link\" and \"image\" attributes to href and src without applying its own URL scheme sanitization (for example quill-delta-to-html or the Quill client).","status":"published","published":"2026-06-29T19:10:49.841Z","modified":"2026-09-08T03:30:05.324359649Z","cvss":[{"version":"4.0","score":5.1,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:33.520522Z"}]}}
