# CVE-2026-41949: LangGenius Dify authorization bypass in file preview endpoint

Source: https://junglewise.ai/threats/cve-2026-41949-langgenius-dify-authorization-bypass-in-file-preview-endpoint  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-05-18. Updated: 2026-05-18  
License: CC BY 4.0 with a link back

CVE-2026-41949 · Severity: medium · CVSS 5.9 · Published 2026-05-18

Dify, an open-source platform for building AI applications, contains a security flaw in its file preview feature. This vulnerability allows any registered user to view the first 3,000 characters of documents uploaded by other organizations or users if they know the document's unique ID. Because Dify Cloud allows free self-registration, an attacker can easily create an account to exploit this flaw and access sensitive business data or private documents across different workspaces.

Technologies: [Langgenius Dify](https://junglewise.ai/threats/technologies/dify). Vendors: [Langgenius](https://junglewise.ai/threats/vendors/langgenius).

## Quick answers

**Is CVE-2026-41949 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-41949 being exploited in the wild.

**How severe is CVE-2026-41949?** Medium severity, with a CVSS score of 5.9, published 18 May 2026.

**Which products and versions are affected?** Langgenius Dify <= 1.14.1.

**Is there a fix for CVE-2026-41949?** A patch was published on 2026-05-14: Patch merged into main branch Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-41949 attacked?** It is attacked over the network, in a network appliance.

**Am I affected by CVE-2026-41949?** Check whether you run Langgenius Dify at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

An authorization bypass (CWE-639) exists in the `/console/api/files/{file_id}/preview` endpoint of Dify. The root cause is a failure in the `FilePreviewApi.get` controller and the underlying `FileService.get_file_preview` method to verify tenant ownership; the application retrieves files based solely on the provided UUID without checking if the requesting user belongs to the file's tenant. An attacker with a valid session (easily obtained via self-registration) can extract the first 3,000 characters of any document if they possess or can intercept the file's UUID. The vulnerability has been addressed in a pull request that adds a tenant-id filter to the database lookup query.

## Affected products

- LangGenius Dify <= 1.14.1

## Timeline

- 2026-05-05: other: Initial patch submitted via pull request
- 2026-05-14: patched: Patch merged into main branch
- 2026-05-18: advisory: CVE published and NVD record created

## References

- [https://github.com/langgenius/dify/pull/35797](https://github.com/langgenius/dify/pull/35797)
- [https://huntr.com/bounties/d50a0240-7951-4939-b989-9bded66c7682](https://huntr.com/bounties/d50a0240-7951-4939-b989-9bded66c7682)
- [https://www.vulncheck.com/advisories/dify-authorization-bypass-via-file-preview-endpoint](https://www.vulncheck.com/advisories/dify-authorization-bypass-via-file-preview-endpoint)

## Related threats

- [langgenius dify hard-coded credentials in sandbox](https://junglewise.ai/threats/cve-2026-123135-a-vulnerability-was-found-in-langgenius-dify-up-to-1-18-0-2-0-0)
- [Dify authorization bypass in MCP server endpoint](https://junglewise.ai/threats/cve-2026-105761-dify-is-an-open-source-llm-app-development-platform-prior-to-1)
- [langgenius dify DOM-based XSS in redirect URL handler](https://junglewise.ai/threats/cve-2026-85022-langgenius-dify-dom-based-xss-in-redirect-url-handler)
- [langgenius Dify DOM-based XSS in splash.tsx redirect](https://junglewise.ai/threats/cve-2026-85021-langgenius-dify-dom-based-xss-in-splash-tsx-redirect)
- [LangGenius Dify server-side template injection in Jinja2 handler](https://junglewise.ai/threats/cve-2026-18632-langgenius-dify-server-side-template-injection-in-jinja2-handler)
