CVE-2026-53427
Cross-site scripting in MDEx via unescaped highlight_lines_class code-fence attribute
Check your servers for CVE-2026-53427
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-53427 affects mdex, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Severity (CVSS)
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
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Attack requirements
- present: an attack works only when the target is in a certain state or configuration
- Privileges required
- none: the attacker does not need an account
- User interaction
- passive: a user has to take part without knowing, such as by viewing a page
- Impact on the vulnerable system
- confidentiality none, integrity none, availability none: what an attacker can read, change or stop in the vulnerable component
- Impact on other systems
- confidentiality low, integrity low, availability none: what an attacker can read, change or stop beyond it
Exploitation
EPSS 0.45%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 40.9% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 29 Jun 2026):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Weakness
- CWE-79 Improper Neutralization of Input During Web Page Generation
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
|
mdex
package
mdex |
affected from 0.8.0, before 0.12.3
Other versions: unaffected
|
|
mdex
package
leandrocp/mdex |
affected from 0107e1d55b7679677a82745911b4139c96307264, before 6ed94d905f97af188323f042698ae841c02293b4
Other versions: unaffected
|
|
mdex_native
package
mdex_native |
affected from 0.1.0, before 0.2.3
Other versions: unaffected
|
|
mdex_native
package
leandrocp/mdex_native |
affected from 956528c5e31746253347029e810a969ab916fd27, before 7738ff428a54058ea0a3293eb2e17b5f4c953e2d
Other versions: unaffected
|
Is my server affected?
Find the installed version of mdex and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i mdex
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2026-53427 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2026-53427RHEL, Rocky, Alma, Fedora
rpm -q mdex
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2026-53427Alpine
apk list --installed | grep -i mdexWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-53427
trivy image --scanners vuln IMAGE | grep CVE-2026-53427
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- XSS via `highlight_lines_class` info-string attribute github.com · vendor advisory, related
Patches and release notes
- Fix commit 6ed94d9 in leandrocp/mdex github.com · patch
- Fix commit 7738ff4 in leandrocp/mdex_native github.com · patch
Other references
- EEF CNA record for CVE-2026-53427 cna.erlef.org · related
- OSV record EEF-CVE-2026-53427 osv.dev · related
- Introducing commit 0107e1d in leandrocp/mdex github.com · related
- Introducing commit 956528c in leandrocp/mdex_native github.com · related
Source: the record CVE-2026-53427 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse