{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "0.11.3"
              },
              {
                "fixed": "0.12.3"
              }
            ],
            "source": "AFFECTED_FIELD"
          },
          "events": [
            {
              "introduced": "6330432e88e75bf98eb91546a5aef13dffd637bb"
            },
            {
              "fixed": "2cb9eb2f6014414b40c8f1e5d5181b9692626c38"
            }
          ],
          "repo": "https://github.com/leandrocp/mdex",
          "type": "GIT"
        },
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "0.1.0"
              },
              {
                "fixed": "0.2.3"
              }
            ],
            "source": [
              "DESCRIPTION",
              "REFERENCES"
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "b6caf84e9dd035654ed7e8955086ab37afdaa7a0"
            },
            {
              "fixed": "798a363b4339f6f7162ec8437c4c9f9b5ae6fbf3"
            }
          ],
          "repo": "https://github.com/leandrocp/mdex_native",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-v664-pmxr-mxxx"
  ],
  "database_specific": {
    "cna_assigner": "EEF",
    "cwe_ids": [
      "CWE-79"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/53xxx/CVE-2026-53427.json",
    "unresolved_ranges": [
      {
        "extracted_events": [
          {
            "introduced": "0d7ffc84ea742e1daf666426814e5bb6d0499433"
          },
          {
            "fixed": "6ed94d905f97af188323f042698ae841c02293b4"
          },
          {
            "introduced": "956528c5e31746253347029e810a969ab916fd27"
          },
          {
            "fixed": "798a363b4339f6f7162ec8437c4c9f9b5ae6fbf3"
          }
        ],
        "source": "AFFECTED_FIELD"
      }
    ]
  },
  "details": "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.\n\nWhen 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 \u003cdiv\u003e. A single-quoted shell token preserves an inner double quote through shlex parsing, so a value such as '\"\u003e\u003cscript\u003ealert(1)\u003c/script\u003e' terminates the class attribute early and the markup that follows is emitted as live HTML.\n\nAn 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.\n\nThe 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.\n\nThis issue affects mdex from 0.11.3 before 0.12.3, and mdex_native from 0.1.0 before 0.2.3.",
  "id": "CVE-2026-53427",
  "modified": "2026-08-12T03:51:28.544103324Z",
  "published": "2026-06-29T18:50:17.185Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://cna.erlef.org/cves/CVE-2026-53427.html"
    },
    {
      "type": "WEB",
      "url": "https://github.com"
    },
    {
      "type": "WEB",
      "url": "https://osv.dev/vulnerability/EEF-CVE-2026-53427"
    },
    {
      "type": "WEB",
      "url": "https://repo.hex.pm"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/53xxx/CVE-2026-53427.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/leandrocp/mdex_native/security/advisories/GHSA-v664-pmxr-mxxx"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-53427"
    },
    {
      "type": "FIX",
      "url": "https://github.com/leandrocp/mdex_native/commit/798a363b4339f6f7162ec8437c4c9f9b5ae6fbf3"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/leandrocp/mdex"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/leandrocp/mdex_native"
    }
  ],
  "schema_version": "1.9.0",
  "severity": [
    {
      "score": "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",
      "type": "CVSS_V4"
    }
  ],
  "summary": "Cross-site scripting in MDEx via unescaped highlight_lines_class code-fence attribute"
}