Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2025-59417: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in lobehub lobe-chat

0
Medium
VulnerabilityCVE-2025-59417cvecve-2025-59417cwe-79
Published: Thu Sep 18 2025 (09/18/2025, 14:38:55 UTC)
Source: CVE Database V5
Vendor/Project: lobehub
Product: lobe-chat

Description

Lobe Chat is an open-source artificial intelligence chat framework. Prior to version 1.129.4, there is a a cross-site scripting (XSS) vulnerability when handling chat message in lobe-chat that can be escalated to remote code execution on the user’s machine. In lobe-chat, when the response from the server is like <lobeArtifact identifier="ai-new-interpretation" ...> , it will be rendered with the lobeArtifact node, instead of the plain text. However, when the type of the lobeArtifact is image/svg+xml , it will be rendered as the SVGRender component, which internally uses dangerouslySetInnerHTML to set the content of the svg, resulting in XSS attack. Any party capable of injecting content into chat messages, such as hosting a malicious page for prompt injection, operating a compromised MCP server, or leveraging tool integrations, can exploit this vulnerability. This vulnerability is fixed in 1.129.4.

AI-Powered Analysis

AILast updated: 09/26/2025, 01:02:32 UTC

Technical Analysis

CVE-2025-59417 is a cross-site scripting (XSS) vulnerability identified in the open-source AI chat framework lobe-chat, specifically affecting versions prior to 1.129.4. The vulnerability arises from improper neutralization of input during web page generation, classified under CWE-79. In lobe-chat, server responses containing <lobeArtifact> nodes are rendered differently based on their type. When the lobeArtifact type is image/svg+xml, the content is rendered using the SVGRender component, which employs React's dangerouslySetInnerHTML to inject SVG content directly into the DOM without sanitization. This unsafe rendering allows an attacker to inject malicious scripts via crafted SVG content embedded in chat messages. Exploitation requires the attacker to inject content into chat messages, which can be achieved by hosting malicious pages for prompt injection, compromising the MCP server, or abusing tool integrations that feed content into the chat. Successful exploitation can escalate from XSS to remote code execution (RCE) on the user's machine, significantly increasing the threat severity. The vulnerability does not require authentication but does require user interaction (viewing the malicious message). The CVSS 4.0 base score is 6.8 (medium severity), reflecting network attack vector, high impact on confidentiality, integrity, and availability, but with high attack complexity and user interaction required. The issue was fixed in version 1.129.4 of lobe-chat.

Potential Impact

For European organizations using lobe-chat, this vulnerability poses a significant risk, especially in environments where chat messages are exchanged with external or untrusted parties. The ability to escalate from XSS to remote code execution means attackers could execute arbitrary code on user machines, potentially leading to data theft, credential compromise, lateral movement within networks, or deployment of malware. Given that lobe-chat is an AI chat framework, it may be integrated into business workflows, customer support, or internal communication platforms, increasing the attack surface. The vulnerability could be exploited to target employees, leading to breaches of sensitive corporate or personal data. Additionally, compromised endpoints could be used as footholds for broader attacks against European enterprises. The requirement for user interaction (viewing malicious content) means social engineering or phishing tactics could facilitate exploitation. The medium CVSS score suggests a moderate but non-trivial risk, warranting prompt remediation to avoid potential operational disruption and reputational damage.

Mitigation Recommendations

European organizations should immediately upgrade all lobe-chat deployments to version 1.129.4 or later, where the vulnerability is patched. Until upgrades are completed, organizations should implement strict input validation and sanitization on any user-generated content or external data fed into lobe-chat, especially SVG content. Employ Content Security Policy (CSP) headers to restrict script execution and mitigate XSS impact. Disable or restrict the rendering of SVG content within chat messages if feasible. Monitor chat logs and network traffic for suspicious payloads or anomalous activity indicative of exploitation attempts. Educate users about the risks of interacting with untrusted chat messages and implement phishing awareness training. Limit integration points and carefully vet third-party tools feeding content into lobe-chat to reduce injection vectors. Employ endpoint detection and response (EDR) tools to detect potential post-exploitation behaviors. Finally, maintain an incident response plan tailored to handle potential RCE incidents stemming from chat platform compromises.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2025-09-15T19:13:16.904Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 68cc1a808818f871806daf43

Added to database: 9/18/2025, 2:43:12 PM

Last enriched: 9/26/2025, 1:02:32 AM

Last updated: 11/3/2025, 2:41:28 PM

Views: 58

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats