Repository navigation
fix: only allow plain tag names in as and is - #523
Merged
Merged
Conversation
commit: |
farnabaz
approved these changes
Nov 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
While testing the Nuxt UI fix for GHSA-x9jw-j844-v24h, these markdown props still reached components on 0.23.3:
::prose-field{as="script"},as="object" data="javascript:…"andas="img src=x onerror=alert(1)", which Vue's server renderer writes straight into the opening tag. Nuxt UI 4.12.2 blocks them on its side, but any other component that rendersasstays exposed.This PR makes
asandisfollow the same ruleMDCRendereralready applies todata.component: a plain tag or component name (/^[a-z][\w-]*$/i) that doesn't name a tag that runs code (script,style,iframe,object,embed,base,link,meta, …).tagkeeps accepting any string since it's often a data prop. The new parser and render tests fail onmain(the render one needs a rebuild to show it), and the full suite, lint and typecheck pass.