Free AI Safety Workshop — in collaboration with explainx.aiSave your seat
AgentbeamBeta
AI agent vulnerability · LobeChat

CVE-2026-23733: Lobe Chat affected by Cross-Site Scripting(XSS) that can escalate to Remote Code Execution(RCE)

criticalCVSS 3.1 9.6GHSA-4gpc-rhpj-9443

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.

Published Jan 20, 2026 · Updated Feb 5, 2026

Affected packages

@lobehub/chat

Ecosystem
npm
Affected
<= 1.143.2
Fixed in
No patched version yet
Check
npm ls @lobehub/chat

Advisory details

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.

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. No analysis has been written for this entry yet. Methodology

More LobeChat vulnerabilities

All LobeChat entries