CVE-2026-53427: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in leandrocp mdex
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.
AI Analysis
Technical Summary
CVE-2026-53427 is a CWE-79 cross-site scripting vulnerability in leandrocp MDEx and mdex_native. When syntax highlighting and full info-string forwarding (render: [full_info_string: true]) are enabled, the Lumis adapter copies the highlight_lines_class info-string attribute from a Markdown code fence into the class attribute of each rendered line without escaping. The parsing preserves inner double quotes, enabling an attacker to inject payloads such as '"><script>alert(1)</script>' that break out of the class attribute and execute arbitrary JavaScript in users' browsers. This vulnerability affects mdex versions >=0.11.3 and <0.12.3, and mdex_native versions >=0.1.0 and <0.2.3. No authentication or special privileges are required for exploitation. The vulnerable code was originally part of mdex and later extracted into mdex_native, where it remains unpatched. No official fix or vendor advisory is currently available.
Potential Impact
An attacker who can submit Markdown content (e.g., via comments, posts, wiki pages, or documentation) can inject arbitrary HTML and JavaScript that executes in the browsers of users viewing the rendered content. This can lead to session theft, account takeover, and other client-side attacks. The vulnerability requires no authentication or special privileges. The CVSS 4.0 score is 2.3 (low severity), reflecting network attack vector, low complexity, partial attack traceability, and user interaction required.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, avoid enabling syntax highlighting with full info-string forwarding (render: [full_info_string: true]) in affected versions. Restrict or sanitize user-submitted Markdown content to prevent injection of malicious info-string attributes. Monitor vendor channels for updates and apply official patches once available.
CVE-2026-53427: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in leandrocp mdex
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/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.
CVSS v4.0
Score 2.3low
Affected software
cpe:2.3:a:leandrocp:mdex:*:*:*:*:*:*:*:*cpe:2.3:a:leandrocp:mdex_native:*:*:*:*:*:*:*:*Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-53427 is a CWE-79 cross-site scripting vulnerability in leandrocp MDEx and mdex_native. When syntax highlighting and full info-string forwarding (render: [full_info_string: true]) are enabled, the Lumis adapter copies the highlight_lines_class info-string attribute from a Markdown code fence into the class attribute of each rendered line without escaping. The parsing preserves inner double quotes, enabling an attacker to inject payloads such as '"><script>alert(1)</script>' that break out of the class attribute and execute arbitrary JavaScript in users' browsers. This vulnerability affects mdex versions >=0.11.3 and <0.12.3, and mdex_native versions >=0.1.0 and <0.2.3. No authentication or special privileges are required for exploitation. The vulnerable code was originally part of mdex and later extracted into mdex_native, where it remains unpatched. No official fix or vendor advisory is currently available.
Potential Impact
An attacker who can submit Markdown content (e.g., via comments, posts, wiki pages, or documentation) can inject arbitrary HTML and JavaScript that executes in the browsers of users viewing the rendered content. This can lead to session theft, account takeover, and other client-side attacks. The vulnerability requires no authentication or special privileges. The CVSS 4.0 score is 2.3 (low severity), reflecting network attack vector, low complexity, partial attack traceability, and user interaction required.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, avoid enabling syntax highlighting with full info-string forwarding (render: [full_info_string: true]) in affected versions. Restrict or sanitize user-submitted Markdown content to prevent injection of malicious info-string attributes. Monitor vendor channels for updates and apply official patches once available.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- EEF
- Date Reserved
- 2026-06-09T11:01:47.529Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a42c23927e9c79719595bfe
Added to database: 06/29/2026, 19:06:33 UTC
Last enriched: 06/29/2026, 19:21:37 UTC
Last updated: 08/12/2026, 00:41:13 UTC
Views: 77
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.