CVE-2026-53427

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

No CVSS.

Configurations

No configuration.

History

20 Nov 2026, 09:20

Type Values Removed Values Added
Summary (en) 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. (en) 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.
References
  • {'url': 'https://github.com/leandrocp/mdex_native/commit/798a363b4339f6f7162ec8437c4c9f9b5ae6fbf3', 'source': '6b3ad84c-e1a6-4bf7-a703-f496b71e49db'}
  • () https://github.com/leandrocp/mdex/commit/0107e1d55b7679677a82745911b4139c96307264 -
  • () https://github.com/leandrocp/mdex/commit/6ed94d905f97af188323f042698ae841c02293b4 -
  • () https://github.com/leandrocp/mdex_native/commit/7738ff428a54058ea0a3293eb2e17b5f4c953e2d -
  • () https://github.com/leandrocp/mdex_native/commit/956528c5e31746253347029e810a969ab916fd27 -

25 Oct 2026, 21:10

Type Values Removed Values Added
Summary
  • (es) Neutralización Incorrecta de Entrada Durante la Generación de Páginas Web (’Cross-site Scripting’) vulnerabilidad en leandrocp MDEx permite cross-site scripting almacenado o reflejado a través de Markdown controlado por el atacante. Cuando el resaltado de sintaxis y el reenvío completo de cadenas de información (render: [full_info_string: true]) están habilitados, el adaptador Lumis copia el valor del atributo de cadena de información highlight_lines_class de una valla de código, sin escapar, en el atributo de clase de cada línea renderizada. comrak_nif::lumis_adapter::LumisAdapter::parse_custom_attributes en native/comrak_nif/src/lumis_adapter.rs analiza con shlex la cadena de información y almacena cada par clave=valor textualmente, highlight_lines_config extrae highlight_lines_class al valor de clase por línea, y write_highlighted interpola ese valor directamente en el atributo de clase del [div] por línea. Un token de shell entre comillas simples preserva una comilla doble interna a través del análisis shlex, por lo que un valor como ’”>[script_tag]alert(1)[/script]’ termina el atributo de clase prematuramente y el marcado que sigue se emite como HTML en vivo. Un atacante que puede enviar Markdown (a través de comentarios, publicaciones, páginas wiki, documentación o cualquier contenido generado por el usuario) puede inyectar HTML y JavaScript arbitrarios que se ejecutan en el navegador de cada usuario que ve la salida renderizada, lo que permite el robo de sesión, la toma de control de cuentas y otros ataques del lado del cliente. No se requiere autenticación ni privilegios especiales. El código nativo vulnerable se envió originalmente dentro de mdex (en native/comrak_nif/src/lumis_adapter.rs) y luego se extrajo en el paquete mdex_native separado (native/mdex_native_nif/src/lumis_adapter.rs), donde permanece sin parchear. Este problema afecta a mdex desde 0.11.3 antes de 0.12.3, y a mdex_native desde 0.1.0 antes de 0.2.3.

29 Jun 2026, 19:19

Type Values Removed Values Added
New CVE

Information

Published : 2026-06-29 19:16

Updated : 2026-12-02 13:17


NVD link : CVE-2026-53427

Mitre link : CVE-2026-53427

CVE.ORG link : CVE-2026-53427


JSON object : View

Products Affected

No product.

CWE
CWE-79

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')