chore(deps): update dependency @nuxtjs/mdc to v0.13.3 [security] - autoclosed #459
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.13.2
->0.13.3
GitHub Vulnerability Alerts
CVE-2025-24981
Summary
An unsafe parsing logic of the URL from markdown can lead to arbitrary JavaScript code due to a bypass to the existing guards around the
javascript:
protocol scheme in the URL.Details
The parsing logic implement at https://github.com/nuxt-modules/mdc/blob/main/src/runtime/parser/utils/props.ts#L16 maintains a deny-list approach to filtering potential malicious payload. It does so by matching protocol schemes like
javascript:
and others.Specifically, this is the code from the mdc library's parser that is not secure enough:
These security guards can be bypassed by an adversarial that provides JavaScript URLs with HTML entities encoded via hex string.
PoC
The following URL payloads if provided to the markdown parsing library (such as through the usage of
import { parseMarkdown } from '@​nuxtjs/mdc/runtime';
) will trigger the alert() dialog:Impact
Users who consume this library and perform markdown parsing from unvalidated sources such as LLM generative text responses, user input and other untrusted sources could result in rendering vulnerable XSS anchor links.
Reference
You may infer the following write-up for more in-depth walkthrough of URL parsing problems and suggestions on how to securely address them: How to Parse URLs from Markdown to HTML Securely?
Release Notes
nuxt-modules/mdc (@nuxtjs/mdc)
v0.13.3
Compare Source
compare changes
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.