/

CVE-2026-41947

Severity:

CRITICAL RISK

(9.1)

Authorization Bypass / Insecure Direct Object Reference

CVE-2026-41947

Modified

Vulnerability type

Category:

Authorization Bypass / Insecure Direct Object Reference

CWE:

CWE-639

Impact:

Cross-Tenant Data Exposure and Session Transcript Exfiltration

Severity:

CRITICAL RISK

(9.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Dify up to version 1.14.1 contains an authorization bypass that lets any authenticated editor user configure and enable tracing for applications they do not own.

By abusing missing tenant ownership checks on trace configuration endpoints, an attacker can redirect messages and responses from victim applications to attacker-controlled LLM trace providers, exposing sensitive conversational data.

Affected context

This vulnerability manifests in multi-tenant Dify deployments where:

  • Applications belong to distinct tenants or organizations.
  • Trace configuration endpoints accept an application identifier and allow editor users to enable or modify tracing.
  • The backend does not strictly verify that the requesting user belongs to the same tenant as the target application.

In such environments, any user with editor-level permissions, including those who self-register in open-signup cloud offerings, can potentially target applications owned by other tenants.

Exploit preconditions

  • Attack surface: Dify HTTP API / web panel endpoints responsible for configuring LLM trace providers and enabling trace collection.
  • Required access: An authenticated account with editor-level permissions in any tenant. In Dify Cloud, such accounts can be obtained via unauthenticated self-registration.
  • Trigger point: The attacker sends requests to trace configuration endpoints referencing application IDs belonging to other tenants.
  • Why exploitation is possible: The backend performs insufficient tenant ownership validation on the application identifier when creating or updating trace configurations, allowing cross-tenant access control bypass (CWE-639).

Why this happens

The underlying flaw is a broken authorization pattern where object access is granted based solely on user role (e.g., "editor") without validating that the user is associated with the tenant owning the target application.

This aligns with CWE-639: Authorization Bypass Through User-Controlled Key, where an attacker manipulates an identifier (such as an application ID) to act on resources outside their authorization scope.

In this case, trace configuration endpoints treat the supplied application identifier as trustworthy and fail to enforce strict tenant-level access control, enabling cross-tenant configuration changes and data redirection.

Potential impact

  • Exposure of user prompts, responses, and other conversational data from victim applications to attacker-controlled tracing providers.
  • Collection of sensitive information processed by LLM workflows, including potential secrets, PII, or business data.
  • Insight into application behavior, prompt engineering strategies, and inference patterns that may aid further attacks.
  • Undermining of tenant isolation guarantees in multi-tenant environments, eroding trust in hosted AI services.

General mitigation guidance

Effective mitigation focuses on enforcing strict, consistent tenant-aware authorization for all resource-modifying endpoints:

  • Implement server-side checks that verify the requesting user's tenant membership and role against the tenant ownership of the target application before allowing trace configuration changes.
  • Centralize authorization logic (e.g., via a dedicated access control layer or policy engine) instead of duplicating checks in individual handlers, reducing the chance of missing validations.
  • Treat all client-supplied identifiers (application IDs, tenant IDs, project IDs) as untrusted and always resolve them through tenant-scoped queries bound to the authenticated principal.
  • Apply least-privilege role design so that trace configuration or observability settings are limited to privileged roles when they affect data routing or cross-system exfiltration risk.
  • Where possible, design trace provider integrations so that cross-tenant or externally controlled endpoints are opt-in and subject to additional review or approvals.

How teams detect issues like this

Detection generally involves a mix of code-centric and runtime analysis:

  • Code review: Look for endpoints that accept application or tenant identifiers and modify configuration (e.g., tracing, logging, webhooks) while only checking role, not explicit tenant ownership.
  • Static analysis: Configure rules to flag authorization checks that do not constrain resource queries by tenant or owner, or API handlers where IDs from the request are used directly in database queries.
  • Access control testing: Incorporate multi-tenant penetration tests where a low-privileged user from Tenant A systematically attempts to act on resources of Tenant B by altering identifiers in requests.
  • Runtime monitoring: Log and monitor trace configuration changes, including user identity, source tenant, and target application, and alert on suspicious cross-tenant patterns or unexpected trace destinations.

Sources

SourceLink
github.comgithub.com/langgenius/dify/commit/55d05fe52de880cd8497df8cea052351c594fad8
github.comgithub.com/langgenius/dify/pull/35793
github.comgithub.com/langgenius/dify/releases/tag/1.14.2
huntr.comhuntr.com/bounties/a43076b2-fbc8-4750-9647-89a036b52f52
vulncheck.comvulncheck.com/advisories/dify-authorization-bypass-via-trace-configuration-endpoints
zafran.iozafran.io/resources/difytap-zafran-discovers-how-attackers-can-silently-wiretap-ai-data-across-tenants-on-a-platform-powering-1m-apps

Frequently asked

questions

Yes. Any user who can obtain an account with editor privileges, including through self-service registration in cloud environments, can attempt to configure tracing for applications belonging to other tenants if ownership checks are missing.

The attacker needs an authenticated editor-capable account. They do not need to belong to the victim tenant; they just need the ability to call trace configuration endpoints and supply target application IDs.

Enforce strict tenant-aware authorization on every request that acts on applications or configurations. Always resolve resources in the context of the authenticated tenant and confirm both role and ownership before applying changes, rather than trusting client-provided identifiers.

Adopt a consistent access control model with centralized policies, treat resource identifiers as untrusted, perform regular multi-tenant security testing, and integrate automated checks (code scanning, policy enforcement) to flag endpoints where tenant ownership is not explicitly validated.

Find out what's already
exploitable in your codebase.