CVE-2026-53427
Cross-site scripting in MDEx via unescaped highlight_lines_class code-fence attribute
Mitigation
- Upgrade mdex to 0.12.3 or later.
- Upgrade mdex to 6ed94d905f97af188323f042698ae841c02293b4 or later.
- Upgrade mdex_native to 0.2.3 or later.
- Upgrade mdex_native to 7738ff428a54058ea0a3293eb2e17b5f4c953e2d or later.
- Vendor workaround: Do not enable full info-string forwarding (render: [full_info_string: true]) when rendering untrusted Markdown, which prevents the highlight_lines_class attribute from reaching the highlighter. Alternatively, restrict highlight_lines_class values to a safe character set (for example [A-Za-z0-9_- ]) before rendering.
Who should check
- Anyone running leandrocp mdex >= 0.8.0, < 0.12.3
- Anyone running leandrocp mdex >= 0107e1d55b7679677a82745911b4139c96307264, < 6ed94d905f97af188323f042698ae841c02293b4
- Anyone running leandrocp mdex_native >= 0.1.0, < 0.2.3
- Anyone running leandrocp mdex_native >= 956528c5e31746253347029e810a969ab916fd27, < 7738ff428a54058ea0a3293eb2e17b5f4c953e2d
Vulnerability facts
- Affected
- leandrocp mdex >= 0.8.0, < 0.12.3; leandrocp mdex >= 0107e1d55b7679677a82745911b4139c96307264, < 6ed94d905f97af188323f042698ae841c02293b4; leandrocp mdex_native >= 0.1.0, < 0.2.3; leandrocp mdex_native >= 956528c5e31746253347029e810a969ab916fd27, < 7738ff428a54058ea0a3293eb2e17b5f4c953e2d
- Fixed in
- leandrocp mdex 0.12.3, leandrocp mdex 6ed94d905f97af188323f042698ae841c02293b4, leandrocp mdex_native 0.2.3, leandrocp mdex_native 7738ff428a54058ea0a3293eb2e17b5f4c953e2d
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 2.3 (v4.0, CNA)CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:NOpen in CVSS calculator
Show all 11 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Attack requirements: Present
- Privileges required: None
- User interaction: Passive
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: None
- Confidentiality impact on other systems: Low
- Integrity impact on other systems: Low
- Availability impact on other systems: None
- EPSS
- 0.78% chance of exploitation in 30 days (percentile 52, 2026-11-26)
- CWE
- CWE-79
- Modified
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| leandrocp mdex | >= 0.8.0, < 0.12.3 | — | cvelist |
| leandrocp mdex | >= 0107e1d55b7679677a82745911b4139c96307264, < 6ed94d905f97af188323f042698ae841c02293b4 | — | cvelist |
| leandrocp mdex_native | >= 0.1.0, < 0.2.3 | — | cvelist |
| leandrocp mdex_native | >= 956528c5e31746253347029e810a969ab916fd27, < 7738ff428a54058ea0a3293eb2e17b5f4c953e2d | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-53427. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-53427.md Affected: leandrocp mdex >= 0.8.0, < 0.12.3; leandrocp mdex >= 0107e1d55b7679677a82745911b4139c96307264, < 6ed94d905f97af188323f042698ae841c02293b4; leandrocp mdex_native >= 0.1.0, < 0.2.3; leandrocp mdex_native >= 956528c5e31746253347029e810a969ab916fd27, < 7738ff428a54058ea0a3293eb2e17b5f4c953e2d Fixed in: leandrocp mdex 0.12.3, leandrocp mdex 6ed94d905f97af188323f042698ae841c02293b4, leandrocp mdex_native 0.2.3, leandrocp mdex_native 7738ff428a54058ea0a3293eb2e17b5f4c953e2d Steps: 1. Search this machine and project for leandrocp mdex, leandrocp mdex_native: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Patches
- https://github.com/leandrocp/mdex/commit/0107e1d55b7679677a82745911b4139c96307264
- https://github.com/leandrocp/mdex/commit/6ed94d905f97af188323f042698ae841c02293b4
- https://github.com/leandrocp/mdex_native/commit/956528c5e31746253347029e810a969ab916fd27
- https://github.com/leandrocp/mdex_native/commit/7738ff428a54058ea0a3293eb2e17b5f4c953e2d
FAQ
Is CVE-2026-53427 being exploited?
There is no confirmed exploitation: CVE-2026-53427 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.78% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-53427?
Low: CVSS 2.3 (v4.0, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.
Which versions are affected by CVE-2026-53427?
leandrocp mdex >= 0.8.0, < 0.12.3; leandrocp mdex >= 0107e1d55b7679677a82745911b4139c96307264, < 6ed94d905f97af188323f042698ae841c02293b4; leandrocp mdex_native >= 0.1.0, < 0.2.3; leandrocp mdex_native >= 956528c5e31746253347029e810a969ab916fd27, < 7738ff428a54058ea0a3293eb2e17b5f4c953e2d.
Is there a fix for CVE-2026-53427?
Yes. Fixed in leandrocp mdex 0.12.3, leandrocp mdex 6ed94d905f97af188323f042698ae841c02293b4, leandrocp mdex_native 0.2.3, leandrocp mdex_native 7738ff428a54058ea0a3293eb2e17b5f4c953e2d. Upgrade mdex to 0.12.3 or later. Upgrade mdex to 6ed94d905f97af188323f042698ae841c02293b4 or later. Upgrade mdex_native to 0.2.3 or later. Upgrade mdex_native to 7738ff428a54058ea0a3293eb2e17b5f4c953e2d or later. Vendor workaround: Do not enable full info-string forwarding (render: [full_info_string: true]) when rendering untrusted Markdown, which prevents the highlight_lines_class attribute from reaching the highlighter. Alternatively, restrict highlight_lines_class values to a safe character set (for example [A-Za-z0-9_- ]) before rendering.
How do I check if I'm affected by CVE-2026-53427?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.