Cross-site scripting in Dify - CVE-2026-42138

 

Cross-site scripting in Dify - CVE-2026-42138

Published: July 27, 2026


Vulnerability identifier: #VU139802
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:U/U:Green
CVE-ID: CVE-2026-42138
CWE-ID: CWE-79
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: LangGenius
Affected software:
Dify

Detailed vulnerability description

The vulnerability allows a remote attacker to execute arbitrary script in a victim's browser.

The vulnerability exists due to cross-site scripting in the file upload handling and served uploaded SVG content when processing uploaded SVG files. A remote attacker can upload a specially crafted SVG file and lure a victim into following the returned source_url to execute arbitrary script in a victim's browser.

The uploaded file can be retrieved through the returned source_url without authentication.


How to mitigate CVE-2026-42138

Install security update from vendor's website.

Sources