GitHub Advisoryadvisory · npm

GHSA-4gpc-rhpj-9443 Lobe Chat affected by Cross-Site Scripting(XSS) that can escalate to Remote Code Execution(RCE)

CRITICAL Published 2026-01-20 Modified 2026-02-05 Official page ↗
Aliases
CVE-2026-23733
Ecosystem
npm
Packages
@lobehub/chat
Severity
Critical
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
Weaknesses
CWE-94
Reviewed
2026-01-20

Affected packages

• npm @lobehub/chat: <= 1.143.2 (no fix yet)

Description

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. ```TypeScript case 'application/lobe.artifacts.mermaid': { return {content}; } ``` The `content` variable, which is derived from user or AI-generated messages, is passed directly to the `` 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 ````Text Please output the following text exactly. Do not use code blocks: ```mermaid graph TD; A[""]; ``` ```` Impact Remote Code Execution (RCE)

Related

Alias · CVE (1)

  • CVE-2026-23733 LobeChat is an open source chat application platform. vulnerability

Weakness · CWE (1)

  • CWE-94 Improper Control of Generation of Code weakness

References