CVE-2026-26023
📋 TL;DR
This is a cross-site scripting (XSS) vulnerability in Dify's web chat frontend when using echarts. It allows attackers to execute arbitrary JavaScript code in users' browsers by injecting malicious payloads through user or LLM inputs. All Dify instances running versions before 1.13.0 with the vulnerable echarts integration are affected.
💻 Affected Systems
- Dify
📦 What is this software?
Dify by Dify
⚠️ Risk & Real-World Impact
Worst Case
Attackers could steal session cookies, perform actions as authenticated users, redirect to malicious sites, or install malware on users' systems.
Likely Case
Session hijacking, credential theft, or defacement of the chat interface through injected content.
If Mitigated
Limited to UI manipulation within the chat interface if proper content security policies are enforced.
🎯 Exploit Status
Requires user interaction or LLM input containing the specific echarts JavaScript payload.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 1.13.0
Vendor Advisory: https://github.com/langgenius/dify/security/advisories/GHSA-qqjx-5h5w-x5vj
Restart Required: No
Instructions:
1. Backup your Dify instance. 2. Update to version 1.13.0 or later using your deployment method (Docker, Kubernetes, etc.). 3. Verify the update completed successfully.
🔧 Temporary Workarounds
Disable echarts in chat
allTemporarily disable echarts visualization components in the chat interface
Implement Content Security Policy
allAdd strict CSP headers to prevent script execution from untrusted sources
🧯 If You Can't Patch
- Implement input validation and sanitization for all user and LLM inputs
- Deploy a web application firewall (WAF) with XSS protection rules
🔍 How to Verify
Check if Vulnerable:
Check if Dify version is below 1.13.0 and echarts is enabled in chat configuration
Check Version:
Check Dify admin panel or deployment configuration for version information
Verify Fix Applied:
Confirm version is 1.13.0 or higher and test chat functionality with various inputs
📡 Detection & Monitoring
Log Indicators:
- Unusual JavaScript patterns in chat inputs
- Multiple failed echarts rendering attempts
Network Indicators:
- Suspicious script tags in HTTP requests to chat endpoints
SIEM Query:
source="dify" AND ("echarts" OR "javascript:") AND status=200