Skip to content

Cross-site scripting in Nuxt AI Chatbot Template (chat-template.nuxt.dev) via unsanitized chat input

Critical
benjamincanac published GHSA-wpmj-r844-vvfg Jan 12, 2026

Package

@nuxt/ui (NuxtUI)

Affected versions

3.3.2

Patched versions

None

Description

Summary

The Nuxt UI ChatPrompt is vulnerable to cross-site scripting (XSS).
User-supplied chat messages are rendered in the browser without proper HTML escaping or sanitization, allowing arbitrary JavaScript execution in the context of the application origin.

In a typical deployment of this template (with authentication and persistent chat history enabled), this can be abused to execute JavaScript in the victim’s browser, steal session data, or perform actions on behalf of authenticated users.

Details

The chat UI takes user input from the message prompt and displays it back in the message list using Nuxt UI chat components. The text content of user messages is rendered as HTML instead of being safely escaped.

Because of this, providing a payload containing a <script> tag in the chat input results in the script being injected into the DOM and executed by the browser when the message is displayed.

Key observations:

  • The issue is reproducible on the public demo at https://chat-template.nuxt.dev/ without authentication.
  • Mixed-case tag names and additional attributes are accepted by the browser, which bypass simple string-based filters, indicating that there is either no sanitization or insufficient sanitization in the message rendering pipeline.

PoC

  1. Open the live demo:
    https://chat-template.nuxt.dev/

  2. In the chat input, without logging in, send the following payload as a message:

    <sCriPt x>(((confirm("XSS"))))``</scRipt x>
image

Severity

Critical

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N

CVE ID

No known CVE

Weaknesses

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. Learn more on MITRE.

Credits