/

CVE-2026-63671

Severity:

HIGH RISK

(8.1)

Cross-Site Scripting (CWE-79) in Nuxt MDC Sanitizer

CVE-2026-63671

Deferred

Vulnerability type

Category:

Cross-Site Scripting

CWE:

CWE-79, CWE-184

Impact:

Client-Side Script Execution

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A high-severity cross-site scripting vulnerability in @nuxtjs/mdc allows certain unsafe URLs in untrusted Markdown to bypass the sanitizer. Under specific rendering conditions, an attacker who can supply or influence Markdown content may cause JavaScript to execute in a user's browser or load active content through an opaque origin.

Affected context

The issue affects applications using @nuxtjs/mdc versions before the security fix when they render untrusted Markdown with dangerous HTML processing enabled. The vulnerable paths involve SVG link attributes represented through framework-style property names and iframe sources using data content, while several ordinary executable HTML URL forms are already filtered.

Exploit preconditions

  • Attack surface: Markdown-to-Vue rendering in an application using @nuxtjs/mdc
  • Required access: Ability to submit, modify, or cause the application to render attacker-controlled Markdown
  • Trigger point: Sanitization and rendering of SVG link attributes or iframe source values
  • Why exploitation is possible: Validation focuses on selected attribute names and compares some blocked schemes against an incomplete URL component, allowing specific active URL forms to bypass filtering

Why this happens

The vulnerability results from incomplete output sanitization and inconsistent normalization of URL-bearing attributes. The validator checks only conventional href and src names, so an equivalent SVG link property can avoid the intended unsafe-scheme checks; separately, filtering data content by comparing denylisted values with only the URL protocol does not identify the complete content type. This maps primarily to CWE-79: Improper Neutralization of Input During Web Page Generation, with CWE-184: Incomplete List of Disallowed Inputs describing the gaps in the sanitizer's denylist and attribute coverage.

Potential impact

  • Arbitrary JavaScript may execute in the context of the affected page
  • User sessions or page-visible data could be exposed
  • An attacker could alter rendered content or perform actions available to the victim
  • Embedded active content could execute in an opaque origin and affect application behavior
  • The vulnerability could facilitate phishing, credential theft, or further client-side compromise

General mitigation guidance

Mitigation generally focuses on treating Markdown as untrusted content and applying complete, context-aware sanitization before rendering.

Common defensive patterns include:

  • Disable dangerous HTML handling for untrusted Markdown unless a narrowly defined use case requires it
  • Use a maintained sanitizer that normalizes URL attributes and covers SVG, iframe, object, and related embedding contexts
  • Apply allowlists for elements, attributes, URL schemes, and permitted destinations rather than relying on partial denylists
  • Validate the complete URL and relevant content type before rendering, including data-based sources
  • Keep Markdown authoring and rendering privileges separate from trusted application content
  • Apply browser security controls such as an appropriate Content Security Policy as defense in depth

How teams detect issues like this

Detection can combine dependency review with focused analysis of Markdown rendering and sanitization boundaries.

  • Use software composition analysis to identify affected @nuxtjs/mdc dependency ranges and confirm that a maintained security-fixed release is in use.
  • Perform static analysis for dangerous HTML rendering options, custom sanitizer hooks, and validators that inspect only literal href or src names.
  • Review code for URL checks based solely on protocol fields, incomplete denylists, or missing SVG and embedded-content coverage.
  • Add policy tests that render representative untrusted Markdown across HTML, SVG, iframe, and data-source contexts and verify that active content is rejected.
  • Monitor browser security reports and application logs for unexpected inline execution or unusual Markdown submissions.

Sources

SourceLink
github.comgithub.com/nuxt-content/mdc/commit/61d636c2983f021288e4fc5c4006733b38cf0d53
github.comgithub.com/nuxt-content/mdc/pull/491
github.comgithub.com/nuxt-content/mdc/releases/tag/v0.22.1
github.comgithub.com/nuxt-content/mdc/security/advisories/GHSA-mxm6-v9r6-r94c

Frequently asked

questions

An attacker generally needs a way to supply or influence Markdown that is subsequently rendered by an application using the affected processing configuration.

No. Server access is not generally required when untrusted Markdown can be submitted through a public form, content workflow, API, or another application-controlled input path.

Use a maintained security-fixed component release, disable dangerous HTML processing for untrusted content, and enforce context-aware allowlist sanitization for all URL-bearing attributes and embedded content.

Treat every user-controlled Markdown field as untrusted, test sanitizer behavior across equivalent HTML and SVG attribute forms, and enforce dependency, static-analysis, and browser security policies in the development pipeline.

Find out what's already
exploitable in your codebase.