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.
Metrics
Affected Vendors & Products
References
History
Sun, 24 Aug 2025 22:00:00 +0000
Type | Values Removed | Values Added |
---|---|---|
First Time appeared |
Nextchat
Nextchat nextchat |
|
Vendors & Products |
Nextchat
Nextchat nextchat |
Fri, 22 Aug 2025 15:45:00 +0000
Type | Values Removed | Values Added |
---|---|---|
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. | |
References |
|

Status: PUBLISHED
Assigner: mitre
Published: 2025-08-22T00:00:00.000Z
Updated: 2025-08-22T15:39:54.260Z
Reserved: 2025-06-16T00:00:00.000Z
Link: CVE-2025-50733

No data.

Status : Awaiting Analysis
Published: 2025-08-22T16:15:43.820
Modified: 2025-08-22T18:08:51.663
Link: CVE-2025-50733

No data.