CVE-2025-59417: Lobe Chat Desktop vulnerable to Remote Code Execution via XSS in Chat Messages
6.1
Basic Information
Technical Details
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
@lobehub/chat | npm | <= 1.129.3 | 1.129.4 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability analysis identified a two-stage exploit chain leading to Remote Code Execution. The root cause is a Cross-Site Scripting (XSS) vulnerability in the SVGRenderer
component, located in src/features/Portal/Artifacts/Body/Renderer/SVG.tsx
. This component unsafely uses dangerouslySetInnerHTML
to render SVG content from chat messages, allowing attackers to execute arbitrary JavaScript. The patch commit 9f044edd07ce102fe9f4b2fb47c62191c36da05c
confirms this by introducing SVG sanitization using DOMPurify
right before the content is rendered.
The second stage of the attack involves escalating the XSS to RCE. The vulnerability description points to the SystemCtr.openExternalLink
method in apps/desktop/src/main/controllers/SystemCtr.ts
. This IPC function can be called from the compromised renderer process to open any link, including local files using the file://
protocol, without validation. This allows the execution of arbitrary applications on the host system. While the provided patch focuses on fixing the XSS entry point, SystemCtr.openExternalLink
remains the critical function that enables the escalation to RCE and is therefore a key part of this vulnerability.
Vulnerable functions
SVGRenderer
src/features/Portal/Artifacts/Body/Renderer/SVG.tsx
SystemCtr.openExternalLink
apps/desktop/src/main/controllers/SystemCtr.ts