CVE-2025-50733: HTMLPreview component of artifacts · NextChat Contains a Cross-site Scripting (XSS)
Source CVE Database V5
Not known to be exploited · CVSS 6.1 Medium.
Data as of 26 Oct 2026, 17:16 UTC
- EPSS
- 0.2% chance of exploitation in 30 days – higher than 10% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NExploitation evidence
Disclosed: evidence found.
CVE published 22 Aug 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
AI-suggested
To mitigate this vulnerability, organizations should implement strict input sanitization and output encoding on all AI-generated HTML content before rendering it in the chat interface. Employ robust HTML sanitization libraries that remove or neutralize potentially dangerous tags and attributes, especially script elements and event handlers. Modify the iframe sandbox permissions to remove 'allow-scripts' unless absolutely necessary, or consider rendering HTML previews in a more restrictive environment that disallows script execution entirely. Implement Content Security Policy (CSP) headers to restrict the execution of inline scripts and loading of external resources within the iframe context. Educate users about the risks of interacting with untrusted AI-generated content and encourage caution when viewing HTML previews. Monitor logs for unusual activity related to the HTMLPreview component and consider deploying runtime application self-protection (RASP) solutions to detect and block XSS attempts. Finally, coordinate with NextChat developers or vendors to obtain patches or updates that address this vulnerability and apply them promptly once available.
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.