Miggo Logo

CVE-2025-43954:
QMarkdown Cross-Site Scripting (XSS) vulnerability

4.9

CVSS Score
3.1

Basic Information

EPSS Score
0.10855%
Published
4/20/2025
Updated
4/21/2025
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:L/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
@quasar/quasar-ui-qmarkdownnpm< 2.0.52.0.5

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The analysis started by fetching the commit information for the provided patch URL. The commit b61dff84851c45369cf931db5bd93db177c657f6 modified the file ui/src/util/extendHeading.js. The core of the vulnerability, as described ("XSS via headers even when no-html is set"), was located in how the extendHeading function set up a custom rendering rule for markdown headings (md.renderer.rules.heading_open).

Specifically, the previous implementation of this rule would create an anchor link for headings. The text content for this anchor link was derived from the header's inline content (label = children.reduce((acc, t) => acc + t.content, '')). This label was then directly assigned to the content property of a new Token of type html_inline. Using html_inline tokens tells markdown-it to pass the content through as raw HTML. This meant that if a header contained an XSS payload (e.g., <h1><img src=x onerror=alert(1)></h1>), the payload within the label would be rendered as HTML, even if the no-html option was enabled in markdown-it (which should prevent such rendering).

The patch rectifies this by no longer creating an html_inline token with the concatenated label. Instead, it preserves the original child tokens of the heading (const originalChildren = children.slice()) and wraps these original tokens with link_open and link_close tokens. This ensures that the actual content of the heading (which forms the link text) is processed by markdown-it's standard rendering pipeline, which correctly applies sanitization rules like no-html.

The function extendHeading is identified as the vulnerable function because it is the entry point in this file that defines and applies this flawed rendering rule. During exploitation, when a markdown document with a malicious header is parsed and rendered, the vulnerable logic within the md.renderer.rules.heading_open callback, established by extendHeading, would be executed.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

QM*rk*own (*k* qu*s*r-ui-qm*rk*own) ***or* *.*.* *llows XSS vi* *****rs *v*n w**n w**n no-*tml is s*t.

Reasoning

T** *n*lysis st*rt** *y **t**in* t** *ommit in*orm*tion *or t** provi*** p*t** URL. T** *ommit `****************************************` mo*i*i** t** *il* `ui/sr*/util/*xt*n*****in*.js`. T** *or* o* t** vuln*r**ility, *s **s*ri*** ("XSS vi* *****rs