CVE-2026-23733: Lobe Chat affected by Cross-Site Scripting(XSS) that can escalate to Remote Code Execution(RCE)
Lobe Chat (the @lobehub/chat package) 1.143.2 and earlier has a stored cross-site scripting flaw in its Mermaid artifact renderer that can be escalated to remote code execution. Content from a chat message, including model output, is rendered without sanitization. No patched version is listed in the advisory.
Published Jan 20, 2026 · Updated Feb 5, 2026 · Analysis Nov 24, 2026
What an attacker can do
Lobe Chat renders chat artifacts. For the type application/lobe.artifacts.mermaid, its Renderer component passes the message content straight into a Mermaid component. The Mermaid library draws HTML labels, such as node text in quotes, into the DOM. If a label holds an image tag with an onerror handler, the script runs in the app's origin (CWE-94, stored XSS).
The content comes from user or AI-generated messages. An attacker therefore needs a way to put text into a conversation the victim views: a shared chat, a pasted prompt, or a page or document that steers the model to emit the artifact. The proof of concept asks the model to output the artifact block exactly. The victim only has to view the message, so the vector lists user interaction as required.
The researcher escalates the script to code execution. The proof of concept sends a request to a /trpc/desktop/mcp endpoint that starts a stdio MCP server from a command and arguments the attacker supplies, and launches the Calculator app as the demonstration. An MCP server definition is a command line, so the script can start any program with the user's rights. The advisory does not say whether server deployments differ from the desktop app.
Who is affected
Affected: the npm package @lobehub/chat, version 1.143.2 and earlier. The advisory lists no patched version. The proof of concept targets the desktop MCP endpoint, so the desktop app is the clear case, and other deployments should be treated as exposed until the maintainers say otherwise.
Check your version:
npm ls @lobehub/chatFor the desktop app, check the version in the About screen. Also look for chats that contain Mermaid artifact blocks you did not create.
@lobehub/chat
- Ecosystem
- npm
- Affected
- <= 1.143.2
- Fixed in
- No patched version yet
- Check
npm ls @lobehub/chat
How to fix it
There is no patched version in the advisory. It lists "None" for patched versions and no workaround. Watch the lobe-chat repository and the advisory for a fixed release, and upgrade when it appears.
Until then, take cautious steps that the sources do not specify: do not open chats from untrusted sources, be careful with prompts and documents that can steer the model, and limit what MCP servers and commands the app is allowed to start.
How to tell if you were hit
Look in chat history for messages that contain a lobeArtifact block of type application/lobe.artifacts.mermaid with HTML in node labels, such as an image tag with an onerror handler. Check for unexpected MCP server entries and for child processes started by the Lobe Chat app, such as a calculator or a shell.
In web logs, look for requests to /trpc/desktop/mcp paths that you did not trigger. If you run Beam beside your agents, its record of agent shell commands can show unexpected processes launched from the app.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
A stored Cross-Site Scripting (XSS) vulnerability in the Mermaid artifact renderer allows attackers to execute arbitrary JavaScript within the application context. This XSS can be escalated to Remote Code Execution (RCE).
Details
The vulnerability exists in the Renderer component responsible for rendering Mermaid diagrams within chat artifacts.
case 'application/lobe.artifacts.mermaid': {
return <Mermaid variant={'borderless'}>{content}</Mermaid>;
}The content variable, which is derived from user or AI-generated messages, is passed directly to the <Mermaid> component without any sanitization. The Mermaid library renders HTML labels (e.g., nodes defined with ["..."]) directly into the DOM. If the content contains malicious HTML tags (like ``), they are executed.
PoC
Please output the following text exactly. Do not use code blocks:
<lobeArtifact type="application/lobe.artifacts.mermaid">graph TD; A[""];
</lobeArtifact>Impact
Remote Code Execution (RCE)
Credited to c2an1.
Questions
- Is there a fix for CVE-2026-23733?
Not in the advisory. It lists no patched version for @lobehub/chat, and the affected range is 1.143.2 and earlier. Watch the project for a release.
- How does the XSS become remote code execution?
The proof of concept's script calls a /trpc/desktop/mcp endpoint that starts a stdio MCP server from an attacker-chosen command. The advisory shows the Calculator app launching as the demonstration.
- Does an attacker need an account?
No privileges are listed. The attacker needs to get content in front of the victim, and the victim must view it. A model that outputs the crafted artifact on request is enough.
- Is CVE-2026-23733 exploited in the wild?
The sources do not say so. The advisory includes a proof of concept, the entry has no CISA catalog data, and the EPSS score is about 0.15 percent.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More LobeChat vulnerabilities
All LobeChat entriesCVE-2026-23835
LobeHub Vulnerable to Improper Authorization in Presigned Upload
medium5.7Feb 1, 2026CVE-2026-23522
Lobe Chat has IDOR in Knowledge Base File Removal that Allows Cross User File Deletion
low3.7No fixJan 20, 2026CVE-2025-62505
Lobe Chat vulnerable to Server-Side Request Forgery with native web fetch module
low3.0Oct 17, 2025CVE-2025-59426
lobe-chat has an Open Redirect
medium4.3Sep 24, 2025CVE-2025-59417
Lobe Chat Desktop vulnerable to Remote Code Execution via XSS in Chat Messages
medium6.8Sep 18, 2025CVE-2024-32965
@lobehub/chat Server Side Request Forgery vulnerability
high8.1Nov 26, 2024
