Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-42138: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in langgenius dify

0
Medium
VulnerabilityCVE-2026-42138cvecve-2026-42138cwe-79
Published: Mon May 04 2026 (05/04/2026, 17:34:36 UTC)
Source: CVE Database V5
Vendor/Project: langgenius
Product: dify

Description

CVE-2026-42138 is a cross-site scripting (XSS) vulnerability in the open-source LLM app development platform Dify, versions prior to 1. 13. 1. The vulnerability allows unauthenticated users to upload SVG files containing malicious scripts via the POST /api/files/upload endpoint. Additionally, the authenticated POST /v1/files/upload endpoint is also vulnerable. This issue has been addressed in version 1. 13. 1.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 05/04/2026, 18:06:54 UTC

Technical Analysis

Dify versions before 1.13.1 contain an XSS vulnerability (CWE-79) in two file upload endpoints: POST /api/files/upload (unauthenticated) and POST /v1/files/upload (authenticated). The flaw allows attackers to upload SVG files with embedded scripts that can execute in users' browsers. The vulnerability has a CVSS 4.0 base score of 6.9, indicating a medium severity. The issue is fixed in version 1.13.1.

Potential Impact

Successful exploitation could allow an attacker to execute arbitrary scripts in the context of the affected application by uploading malicious SVG files. This can lead to typical XSS impacts such as session hijacking, defacement, or redirection. Both unauthenticated and authenticated upload endpoints are affected, increasing the attack surface.

Mitigation Recommendations

Upgrade Dify to version 1.13.1 or later, where this vulnerability is patched. Since the vendor advisory confirms the fix in 1.13.1, applying this update fully mitigates the issue. No additional vendor guidance is provided, so remediation relies on upgrading.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-04-24T17:15:21.833Z
Cvss Version
4.0
State
PUBLISHED
Remediation Level
null

Threat ID: 69f8dca1cbff5d86103c013f

Added to database: 5/4/2026, 5:51:29 PM

Last enriched: 5/4/2026, 6:06:54 PM

Last updated: 5/4/2026, 7:09:42 PM

Views: 3

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses