Skip to main content

MDEx CVE-2026-54889

| EUVDEUVD-2026-40178 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-06-29 EEF
5.1
CVSS 4.0 · Vendor: EEF
Share

Severity by source

Vendor (EEF) PRIMARY
5.1 MEDIUM
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
vuln.today AI
6.1 MEDIUM

Network-delivered XSS with scope change to victim browser; user click required (UI:R); no privileges needed to submit Markdown input to the application.

3.1 AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N

Primary rating from Vendor (EEF).

CVSS VectorVendor: EEF

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
A
Scope
X

Lifecycle Timeline

1
Analysis Generated
Jun 29, 2026 - 19:51 vuln.today

DescriptionCVE.org

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.

AnalysisAI

Cross-site scripting in MDEx (Elixir Markdown library by leandrocp), versions 0.8.3 through 0.13.1, allows any attacker who can supply Markdown content to inject javascript: URLs that execute in the browser of any user who views the downstream-rendered output. The MDEx to_delta/2 function copies link, wikilink, and image URLs verbatim into Quill Delta attributes without a scheme allowlist, meaning a crafted payload like [click](javascript:alert(document.cookie)) survives intact; when a downstream renderer such as quill-delta-to-html converts that Delta to HTML, the javascript: scheme becomes an executable href. No public exploit has been identified at time of analysis, though the attack requires only standard Markdown syntax, and a vendor-released patch is available in version 0.13.2.

Technical ContextAI

MDEx (CPE: cpe:2.3:a:leandrocp:mdex) is an Elixir library that converts Markdown into multiple output formats, including Quill Delta - a JSON-based rich-text representation used by the Quill.js editor ecosystem. The root cause is CWE-79 (Improper Neutralization of Input During Web Page Generation): the function Elixir.MDEx.DeltaConverter.default_convert_node/3 in lib/mdex/delta_converter.ex extracts the URL value from parsed link, wikilink, and image AST nodes and copies it directly into the Delta 'link' or 'image' attribute without applying any scheme allowlist or normalization. MDEx itself does not render HTML - it produces an intermediate Delta structure - so the vulnerability is latent in the Delta JSON until a downstream renderer (quill-delta-to-html, Quill.js client) materializes it into actual HTML <a href> or <img src> attributes. This two-stage architecture means the XSS payload is injected at the Elixir server layer but detonates in the end user's browser, crossing a trust boundary that the CVSS 4.0 SC:L/SI:L subsequent-system metrics correctly reflect.

RemediationAI

Upgrade MDEx to version 0.13.2 or later, which is the vendor-released patch that resolves the missing scheme allowlist in DeltaConverter. The specific fix is available in commit 2817147f5b87ce7186aa604c9ee72499485b8f2f at https://github.com/leandrocp/mdex/commit/2817147f5b87ce7186aa604c9ee72499485b8f2f, and the full vendor advisory is at https://github.com/leandrocp/mdex/security/advisories/GHSA-4383-7xfp-gpph. For applications that cannot immediately upgrade, a compensating control is to sanitize all Delta 'link' and 'image' attribute values at the rendering layer before passing the Delta to quill-delta-to-html or the Quill.js client - reject or strip any URL whose scheme is not in an explicit allowlist of http, https, and mailto (or ftp if required). Note that server-side input validation on the raw Markdown text before calling to_delta/2 is insufficient as a standalone control, because the unsafe scheme is copied into the intermediate Delta structure and persists until rendering; the sanitization must occur at the point where the Delta is materialized into HTML.

Share

CVE-2026-54889 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy