CVE-2026-53427 Details
Description
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/autumnus_adapter.rs, later renamed to 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). This issue affects mdex: from 0.8.0 before 0.12.3; mdex_native: from 0.1.0 before 0.2.3.
A cross-site scripting vulnerability has been identified in the MDEx library by leandrocp, affecting versions 0.11.3 prior to 0.12.3, as well as in the mdex_native package, versions 0.1.0 prior to 0.2.3. This vulnerability allows for stored or reflected cross-site scripting through attacker-controlled Markdown. When syntax highlighting is enabled and full info-string forwarding is active, the Lumis adapter improperly handles the highlight_lines_class attribute from code fences. This unescaped data is injected into the class attribute of each rendered line, where it can be exploited to execute arbitrary HTML and JavaScript in the browsers of users viewing the content. The issue arises from the way the info string is parsed and applied to the rendered output, creating a vector for session theft, account takeover, and other client-side attacks. Notably, no authentication or special privileges are required to exploit this vulnerability.
Users can update to MDEx version 0.12.3 or later, and mdex_native version 0.2.3 or later. If an immediate update is not possible, avoid enabling full info-string forwarding when rendering untrusted Markdown, or restrict highlight_lines_class values to a safe character set before rendering.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jun 29, 2026CISA-ADP
Assessed Jun 29, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | EEF |
Affected Products
| Product | Versions |
|---|---|
| leandrocp mdex | >= 0.11.3, < 0.12.3 (semver) |
CPE
Remediation
| |
| leandrocp mdex_native | >= 0.1.0, < 0.2.3 (semver) |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Nov 20, 2026 | CVE Modified | EEF |
| Oct 25, 2026 | CVE Translated | [email protected] |
| Jun 29, 2026 | CVE Modified | CISA-ADP |
| Jun 29, 2026 | New CVE Received | EEF |
Volerion