CVE-2025-50733 Details
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.
A cross-site scripting (XSS) vulnerability has been identified in NextChat version 2.16.0, specifically within the HTMLPreview component of artifacts.tsx. This vulnerability allows attackers to execute arbitrary JavaScript when HTML content is displayed in the AI chat interface. The issue arises because user-influenced HTML from AI responses is rendered in an iframe with 'allow-scripts' sandbox permission, lacking proper sanitization. Exploitation can occur through carefully crafted prompts that prompt the AI to generate malicious HTML or JavaScript. Once a user views the HTML preview, the injected JavaScript executes in their browser context, potentially enabling attackers to exfiltrate sensitive information, such as API keys from localStorage, perform actions on behalf of the user, and steal session data. Additionally, this vulnerability can function as a stored XSS, as an attacker can share the chat link, replaying the history and triggering the same payload.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Aug 22, 2025CISA-ADP
Assessed Aug 26, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/fai1424/Vulnerability-Research/blob/main/CVE-2025-50733/README.md | CISA-ADP | Broken Link |
| https://github.com/fai1424/Vulnerability-Research/blob/main/CVE-2025-50733/README.md | [email protected] | Broken Link |
| https://hackmd.io/@fai1424/BkgqMnNxgl | [email protected] | ExploitTechnical Description |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | CISA-ADP |
Affected Products
| Product | Versions |
|---|---|
| NextChat | 2.16.0 (semver) |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Aug 26, 2025 | CVE Modified | CISA-ADP |
| Aug 22, 2025 | New CVE Received | [email protected] |
Volerion