CVE-2025-50733
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-08-22

Last updated on: 2025-08-26

Assigner: 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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-08-22
Last Modified
2025-08-26
Generated
2026-05-27
AI Q&A
2025-08-22
EPSS Evaluated
2026-05-25
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
nextchat nextchat 2.16.0
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 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.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is a cross-site scripting (XSS) issue in the HTMLPreview component of NextChat's artifacts.tsx file. It allows attackers to execute arbitrary JavaScript code by injecting malicious HTML content into the AI chat interface. The problem arises because user-influenced HTML from AI responses is rendered inside an iframe with 'allow-scripts' sandbox permission but without proper sanitization. Attackers can craft prompts that cause the AI to generate harmful HTML/JavaScript, which executes when a user views the HTML preview.


How can this vulnerability impact me? :

This vulnerability can lead to attackers executing malicious JavaScript in the user's browser context. This can result in exfiltration of sensitive information such as API keys stored in localStorage, unauthorized actions performed on behalf of the user, and theft of session data, potentially compromising user accounts and data security.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart