CVE-2025-50733
JSON

6.1medium

NextChat contains a cross-site scripting (XSS) vulnerability in the HTMLPreview component of artifacts.tsx that allows attackers to execute…

Severity
6.1medium CVSS:3.1 by CISA-ADP
Exploit likelihood
0.28% (higher than 22% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre

Description

NextChat contains a cross-site scripting (XSS) vulnerability in the HTMLPreview component of artifacts.tsx that allows attackers to execute arbitrary JavaScript code when HTML content is rendered in the AI chat interface. The vulnerability occurs because user-influenced HTML from AI responses is rendered in an iframe with 'allow-scripts' sandbox permission without proper sanitization. This can be exploited through specifically crafted prompts that cause the AI to generate malicious HTML/JavaScript code. When a user views the HTML preview, the injected JavaScript executes in the user's browser context, potentially allowing attackers to exfiltrate sensitive information (including API keys stored in localStorage), perform actions on behalf of the user, and steal session data.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List

Classification

CWE-79

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

NextChat contains a cross-site scripting (XSS) vulnerability in the HTMLPreview component of artifacts.tsx that allows attackers to execute arbitrary JavaScript code when HTML content is rendered in the AI chat interface. The vulnerability occurs because user-influenced HTML from AI responses is rendered in an iframe with 'allow-scripts' sandbox permission without proper sanitization. This can be exploited through specifically crafted prompts that cause the AI to generate malicious HTML/JavaScript code. When a user views the HTML preview, the injected JavaScript executes in the user's browser context, potentially allowing attackers to exfiltrate sensitive information (including API keys stored in localStorage), perform actions on behalf of the user, and steal session data.

NVD (es)

NextChat contiene una vulnerabilidad de cross-site scripting (XSS) en el componente HTMLPreview de artifacts.tsx que permite a los atacantes ejecutar código JavaScript arbitrario al renderizar contenido HTML en la interfaz de chat de la IA. Esta vulnerabilidad se produce porque el HTML generado por el usuario, procedente de las respuestas de la IA, se renderiza en un iframe con el permiso "allow-scripts" de sandbox sin la debida depuración. Esto puede explotarse mediante avisos manipulados específicamente que provocan que la IA genere código HTML/JavaScript malicioso. Cuando un usuario visualiza la vista previa HTML, el JavaScript inyectado se ejecuta en el contexto del navegador del usuario, lo que potencialmente permite a los atacantes extraer información confidencial (incluidas las claves de API almacenadas en localStorage), realizar acciones en nombre del usuario y robar datos de la sesión.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-50733 changed 2025-08-26CVE Terms of Use
NVDCVE-2025-50733 changed 2026-06-17Public domain