/

CVE-2026-71320

Severity:

HIGH RISK

(8.1)

Template Injection (CWE-94) in Nuxt Vue.js Framework

CVE-2026-71320

Received

Vulnerability type

Category:

Server-Side Template Injection

CWE:

CWE-74, CWE-94

Impact:

Server-Side Code Execution

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A template injection vulnerability in Nuxt allows an attacker to supply a template key through the /__nuxt_island/ props path and have it processed by a dynamic component. When vue.runtimeCompiler: true is enabled, this may result in code execution within the Nitro server process.

Affected context

The issue can occur in Nuxt applications that use the affected framework releases, expose the Nuxt Island props handling path, and enable vue.runtimeCompiler: true. Risk is concentrated where attacker-controlled props can reach a dynamic component and be interpreted as a Vue template within the Nitro process.

Exploit preconditions

  • Attack surface: The Nuxt Island props handling endpoint, including /__nuxt_island/
  • Required access: Ability to send requests or otherwise influence props accepted by the application
  • Trigger point: Processing attacker-influenced template data through a dynamic component
  • Required configuration: vue.runtimeCompiler: true
  • Why exploitation is possible: User-controlled template content can reach a runtime compiler instead of being treated solely as inert data

Why this happens

The underlying bug is insufficient separation between untrusted component properties and executable template content. When a template key supplied through the Nuxt Island props path is passed to a dynamic component, the Vue runtime compiler may interpret that value as a template. This behavior maps primarily to CWE-94, Improper Control of Generation of Code, and is also related to CWE-74, Injection, because attacker-controlled input reaches an interpreter without adequate trust or context enforcement.

Potential impact

  • An attacker may execute code within the Nitro server process
  • The application process could be compromised
  • Server-side secrets or environment data may be exposed
  • The attacker could alter rendered content or application behavior
  • The compromise could enable further access to connected services, depending on process privileges

General mitigation guidance

Mitigation generally focuses on preventing untrusted data from becoming

executable template content.

Common defensive patterns include:

  • Avoiding runtime template compilation when it is not required
  • Treating component props and template identifiers as data, not markup or code
  • Allowlisting dynamic components and accepted template keys
  • Enforcing strict schemas and type validation at the request boundary
  • Separating trusted server-defined templates from user-controlled input
  • Running the Nitro process with least privilege and limiting access to secrets
  • Applying network and filesystem restrictions to reduce post-compromise impact

How teams detect issues like this

Detection approaches may include:

  • Static analysis for runtime compiler activation and dynamic template construction
  • Code review checks for request-derived values reaching dynamic components
  • Searches for unrestricted template, component, or render-function inputs
  • Runtime monitoring of unusual template-related requests to Nuxt Island endpoints
  • Policy enforcement requiring allowlists for dynamic components and template keys
  • Automated security review tools that flag interpreter boundaries involving user input

Sources

SourceLink
github.comgithub.com/nuxt/nuxt/commit/5b60017f7f1d5e9384cadf1d6c580b99d583c418
github.comgithub.com/nuxt/nuxt/commit/ee6c846338f4eb75801815dda86df1f494725859
github.comgithub.com/nuxt/nuxt/releases/tag/v3.21.10
github.comgithub.com/nuxt/nuxt/releases/tag/v4.5.1
github.comgithub.com/nuxt/nuxt/security/advisories/GHSA-9473-5f9j-94wq

Frequently asked

questions

It may be remotely exploitable when the application exposes the affected

Nuxt Island handling path and accepts attacker-influenced props over HTTP.

The attacker generally needs to submit requests or control input that reaches

the dynamic component. Direct server or filesystem access is not necessarily

required if the endpoint is publicly reachable.

Prevent untrusted values from reaching runtime template compilation. Prefer

non-compiled, data-only rendering and enforce strict allowlists and schemas

for dynamic components and template-related inputs.

Keep runtime compilers disabled unless necessary, review all interpreter

boundaries, validate inputs at trust boundaries, and run server processes

with minimal privileges and limited access to sensitive resources.

Find out what's already
exploitable in your codebase.