CVE-2025-50733 Cross-site scripting in n/a

Medium 6.1 Published Updated

Attackers can execute arbitrary JavaScript in NextChat via unsanitized AI-generated HTML, potentially stealing API keys and session data.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2025-50733?

CVE-2025-50733 is a medium-severity cross-site scripting vulnerability in n/a, published on 22 Aug 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-79

Which versions are affected by CVE-2025-50733?

How do I fix CVE-2025-50733?

No fix has been published for CVE-2025-50733 yet. Limit exposure of the affected software until one is available.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2025-50733 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-50733 exists.

Sources

Also known as GHSA-h694-q3m4-6r6p.

Is CVE-2025-50733 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free