Why it happens
v-html sets innerHTML without escaping, so markup in a value a visitor can shape runs as script in the page. Doctor follows the value through refs, computed values, props, and the local modules and Nuxt auto-imports its functions come from. It reports route, request, cookie, storage, fetched, and v-model values as errors, and HTML whose source it cannot trace, such as a prop, as a low-confidence warning. Shiki and uqr output, DOMPurify, sanitize-html and xss output, and string literals pass. Markdown rendered by marked or HTML-enabled markdown-it is as trusted as its input. Ordinary markdown-it instances with raw HTML disabled pass; customized or unresolved renderers produce a warning.
Fix
Render untrusted values as text, or sanitize them with DOMPurify.sanitize() or sanitize-html before binding them to v-html.
Example
Sanitize HTML from the route
Before
<script setup lang="ts">
const route = useRoute()
</script>
<template>
<div v-html="route.query.bio" />
</template>
After
<script setup lang="ts">
import DOMPurify from "dompurify"
const route = useRoute()
const bio = computed(() => DOMPurify.sanitize(String(route.query.bio ?? "")))
</script>
<template>
<div v-html="bio" />
</template>
Verify the fix
Run only this rule after editing so the report stays focused on the diagnostic you are closing:
pnpm vite-doctor . --framework vue --rules vue/security/restrict-v-html