# CVE-2026-53427: Cross-site scripting in MDEx via unescaped highlight\_lines\_class code-fence attribute

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** LOW 2.3
- **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:N`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.78% (percentile 52, 2026-11-28)
- **CWE:** CWE-79
- **Published:** 2026-06-29T18:50:17.185Z
- **Modified:** 2026-11-20T09:20:13.647Z

## 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

## 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

- 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)

## 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.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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-28).

### 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.

## References

- vendor: <https://github.com/leandrocp/mdex_native/security/advisories/GHSA-v664-pmxr-mxxx>
- patch: <https://github.com/leandrocp/mdex/commit/0107e1d55b7679677a82745911b4139c96307264>
- patch: <https://github.com/leandrocp/mdex/commit/6ed94d905f97af188323f042698ae841c02293b4>
- patch: <https://github.com/leandrocp/mdex_native/commit/956528c5e31746253347029e810a969ab916fd27>
- patch: <https://github.com/leandrocp/mdex_native/commit/7738ff428a54058ea0a3293eb2e17b5f4c953e2d>
- other: <https://cna.erlef.org/cves/CVE-2026-53427.html>
- other: <https://osv.dev/vulnerability/EEF-CVE-2026-53427>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-53427>

HTML: <https://flawdb.com/CVE-2026-53427> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-53427>
