Langgenius Dify Stored Cross-Site Scripting Vulnerability via SVG Markdown

Vulnerability

A stored cross-site scripting vulnerability has been identified in the latest version of Langgenius Dify. This issue arises from inadequate validation and sanitization of user input in SVG markdown support within the chatbot feature. An attacker can exploit this vulnerability by injecting malicious SVG content that executes arbitrary JavaScript code when an admin views it, potentially leading to credential theft.

Impact

Exploitation allows an attacker to execute JavaScript in the context of an admin user, with the potential to steal admin credentials.

Reproduction

To reproduce this vulnerability, inject SVG markup containing JavaScript payloads into a chatbot that supports SVG markdown. Once the SVG is rendered in the chatbot, the JavaScript will execute. For example, an SVG image tag can be used to trigger an 'onerror' event, executing JavaScript code such as an alert or a request to a server with stolen data.

Added: Jun 9, 2025, 7:46 PM
Updated: Jun 9, 2025, 7:46 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
1.7
exploitability
4.4
remediation
0.0
relevance
0.0
threat
6.4
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.