# CVE-2026-53427: Cross-site scripting in MDEx via unescaped highlight_lines_class code-fence attribute

- Severity: Low 2.3 (CVSS:4.0, scored by EEF) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.45%, higher than 40% of CVEs (2026-12-01)
- Published: 2026-06-29T18:50:17.185Z
- Modified: 2026-11-25T17:23:09.546Z
- Also known as: EEF-CVE-2026-53427, GHSA-v664-pmxr-mxxx
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: EEF

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

(As written by CVE List.)

## Affected

- mdex: from 0.8.0 before 0.12.3
- leandrocp/mdex: from 0107e1d55b7679677a82745911b4139c96307264 before 6ed94d905f97af188323f042698ae841c02293b4
- mdex_native: from 0.1.0 before 0.2.3
- leandrocp/mdex_native: from 956528c5e31746253347029e810a969ab916fd27 before 7738ff428a54058ea0a3293eb2e17b5f4c953e2d
- mdex (Hex): from 0.8.0 before 0.12.3
- mdex_native (Hex): from 0.1.0 before 0.2.3
- https://github.com/leandrocp/mdex: from 0107e1d55b7679677a82745911b4139c96307264 before 6ed94d905f97af188323f042698ae841c02293b4
- https://github.com/leandrocp/mdex_native: from 956528c5e31746253347029e810a969ab916fd27 before 7738ff428a54058ea0a3293eb2e17b5f4c953e2d

## Every score

- EEF: CVSS:4.0 2.3 Low `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`
- Erlang Ecosystem Foundation: CVSS:4.0 `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`

## References

- <https://github.com/leandrocp/mdex_native/security/advisories/GHSA-v664-pmxr-mxxx> (advisory, related, vendor-advisory)
- <https://cna.erlef.org/cves/CVE-2026-53427.html> (related, web)
- <https://osv.dev/vulnerability/EEF-CVE-2026-53427> (related)
- <https://github.com/leandrocp/mdex/commit/0107e1d55b7679677a82745911b4139c96307264> (related, web)
- <https://github.com/leandrocp/mdex/commit/6ed94d905f97af188323f042698ae841c02293b4> (fix, patch)
- <https://github.com/leandrocp/mdex_native/commit/956528c5e31746253347029e810a969ab916fd27> (related, web)
- <https://github.com/leandrocp/mdex_native/commit/7738ff428a54058ea0a3293eb2e17b5f4c953e2d> (fix, patch)
- <https://hex.pm/packages/mdex> (package)
- <https://hex.pm/packages/mdex_native> (package)

## Sources

- CVE List: [CVE-2026-53427](https://www.cve.org/CVERecord?id=CVE-2026-53427), CVE Terms of Use, modified 2026-11-20
- Erlang Ecosystem Foundation: [EEF-CVE-2026-53427](https://osv.dev/vulnerability/EEF-CVE-2026-53427), CC-BY-4.0, modified 2026-11-25
- NVD: [CVE-2026-53427](https://nvd.nist.gov/vuln/detail/CVE-2026-53427), Public domain, modified 2026-11-20

---

Page: https://cve.day/CVE-2026-53427 · Whole record: https://cve.day/CVE-2026-53427.json · Rebuilt by cve.day 2026-11-25T22:59:26.638Z
