CVE-2026-42138: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in langgenius dify
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 Analysis
Technical Summary
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.
CVE-2026-42138: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in langgenius 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
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.
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.