Vue 3.5
Last reviewed Oct 11, 2026
Prompt Details
Prompt Composition
2prompts
- JavaScript ES2026102 lines · 3.1K tokens
- Vue 3.554 lines · 1.3K tokens
Total156 lines · 4.4K tokens
CWE Coverage
- 20
- 79
- 89
- 94
- 95
- 117
- 201
- 208
- 209
- 323
- 338
- 346
- 347
- 352
- 362
- 459
- 471
- 488
- 494
- 502
- 524
- 538
- 602
- 614
- 770
- 772
- 807
- 829
- 838
- 862
- 916
- 918
- 922
- 942
- 943
- 1004
- 1275
- 1321
- 1333
Prompt Preview
Apply the JavaScript ES2026 baseline first. These rules cover Vue 3.5.
Templates and HTML output
- Keep template source fully trusted: Vue compiles templates to JavaScript, so request-, CMS-, translation-, or tenant-supplied templates are code execution and can breach the SSR host.
- With a compiler-enabled build and no root
renderortemplate, mountcreateApp()only on trusted markup; Vue compiles the container's existing HTML, including server-rendered user content. - Render untrusted values with text interpolation or
v-textso Vue escapes them. - Avoid
v-html, which setsinnerHTML; sanitize rich HTML with a maintained allowlist sanitizer immediately before binding, and never use it to compose templates. - Never concatenate fragments after sanitizing or compile user-authored templates in the application origin.
- Keep untrusted values out of inline scripts, styles, event handlers, raw SVG, and other executable contexts.
Attributes, URLs, and components
- Sanitize user URLs on the backend before persistence, then enforce destination-specific scheme/host/path allowlists before
:href,:src, form, iframe, or resource bindings; attribute escaping doesn't blockjavascript:. - Never
v-bind="object"untrusted objects onto DOM elements or privileged components. In SSR the object's keys become HTML attribute names, so build bound objects from attribute names fixed in code, never request, CMS, or user keys. - Map dynamic component names through an exact trusted registry, never arbitrary names or import paths.
- Register directives, global properties,