CVE-2026-23733 Overview
LobeChat, an open source chat application platform, contains a stored Cross-Site Scripting (XSS) vulnerability in its Mermaid artifact renderer that can be escalated to Remote Code Execution (RCE). The vulnerability exists in versions prior to 2.0.0-next.180 and allows attackers to execute arbitrary JavaScript within the application context. When exploited in the Electron desktop application, attackers can leverage the exposed electronAPI IPC bridge to run arbitrary system commands on the victim's machine.
Critical Impact
Stored XSS vulnerability can be escalated to full Remote Code Execution, allowing attackers to execute arbitrary system commands on victim machines through the Electron IPC bridge.
Affected Products
- LobeChat versions prior to 2.0.0-next.180
- LobeChat Electron desktop application with exposed electronAPI IPC bridge
Discovery Timeline
- 2026-01-18 - CVE-2026-23733 published to NVD
- 2026-01-18 - Last updated in NVD database
Technical Details for CVE-2026-23733
Vulnerability Analysis
This vulnerability is classified under CWE-94 (Improper Control of Generation of Code), representing a code injection flaw. The stored XSS vulnerability resides in the Mermaid artifact renderer component of LobeChat. Mermaid is a JavaScript-based diagramming and charting tool that renders markdown-inspired text definitions to create diagrams dynamically. The renderer fails to properly sanitize user-controlled input before processing, allowing malicious JavaScript to be stored and later executed when other users view the crafted content.
What makes this vulnerability particularly dangerous is its potential for escalation. In the Electron desktop application environment, the electronAPI IPC (Inter-Process Communication) bridge is exposed to the renderer process. When an attacker successfully executes JavaScript through the stored XSS, they can leverage this IPC bridge to communicate with the main Electron process, which has access to Node.js APIs and can execute system commands. This transforms a client-side scripting vulnerability into a full Remote Code Execution scenario.
Root Cause
The root cause lies in improper input validation and sanitization within the Mermaid artifact renderer. User-supplied diagram definitions are not adequately sanitized before being processed and rendered, allowing injection of malicious script content. Additionally, the Electron application's security architecture exposes the electronAPI IPC bridge to the renderer context without sufficient isolation, enabling the XSS payload to escalate privileges and execute system-level commands.
Attack Vector
The attack requires local access and high privileges with user interaction. An attacker must craft a malicious Mermaid diagram containing embedded JavaScript. When this content is stored in the application (such as in a chat message or shared document), any user who subsequently views the diagram will execute the malicious script. In the Electron desktop environment, the script can then call methods on the electronAPI object to interact with the main process and execute arbitrary commands on the underlying operating system.
The attack chain involves:
- Injecting malicious JavaScript into a Mermaid diagram definition
- Storing the malicious content within the LobeChat application
- Victim viewing the stored content, triggering XSS execution
- Malicious script accessing the electronAPI IPC bridge
- Executing system commands through the Electron main process
For detailed technical information about the vulnerability mechanism, refer to the GitHub Security Advisory.
Detection Methods for CVE-2026-23733
Indicators of Compromise
- Suspicious Mermaid diagram content containing script tags, event handlers, or JavaScript URIs
- Unexpected IPC calls to the electronAPI bridge from renderer processes
- Unusual system command execution originating from the LobeChat Electron process
- Anomalous network connections or file system access initiated by the application
Detection Strategies
- Monitor application logs for malformed or suspicious Mermaid diagram definitions
- Implement Content Security Policy (CSP) violation logging to detect inline script execution attempts
- Use endpoint detection tools to monitor for suspicious child process spawning from Electron applications
- Audit stored user content for potential XSS payloads targeting the Mermaid renderer
Monitoring Recommendations
- Enable verbose logging for the Mermaid renderer component to capture processing errors
- Monitor Electron main process for unexpected IPC messages or command execution requests
- Implement real-time alerting for CSP violations within the application context
- Track file system and network activity originating from the LobeChat application process
How to Mitigate CVE-2026-23733
Immediate Actions Required
- Upgrade LobeChat to version 2.0.0-next.180 or later immediately
- Review stored content for potentially malicious Mermaid diagrams
- Consider disabling the Mermaid artifact renderer until patching is complete
- Restrict the electronAPI IPC bridge exposure using context isolation and preload scripts
Patch Information
The vulnerability has been patched in LobeChat version 2.0.0-next.180. Organizations should upgrade to this version or later to remediate the vulnerability. The patch addresses the input sanitization issues in the Mermaid artifact renderer, preventing the injection of malicious JavaScript content. For complete patch details, see the GitHub Security Advisory.
Workarounds
- Disable the Mermaid artifact renderer feature if not required for business operations
- Implement strict Content Security Policy headers to mitigate XSS impact
- Enable Electron context isolation to limit renderer process access to Node.js APIs
- Use the sandbox option in Electron BrowserWindow configurations to restrict renderer capabilities
- Review and restrict the methods exposed through the electronAPI IPC bridge
# Verify LobeChat version to confirm patch status
# Check package.json or application settings for version information
npm list lobe-chat
# Update to patched version
npm update lobe-chat@2.0.0-next.180
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

