/

CVE-2026-61595

Severity:

HIGH RISK

(7.7)

Cross-Tenant Authorization (CWE-862) in djust LiveView

CVE-2026-61595

Deferred

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-636, CWE-862

Impact:

Cross-Tenant Data Disclosure

Severity:

HIGH RISK

(7.7)

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

A tenant-isolation flaw in djust affects live WebSocket and SSE requests, where tenant context was not reliably established and tenant-aware queries could return unfiltered data. A user holding a live connection may therefore view database rows belonging to other tenants when the affected live paths are used.

Affected context

The issue occurs in djust deployments using the djust.tenants isolation feature with LiveView-style WebSocket or SSE interactions. HTTP middleware established tenant context, but the live path did not consistently bind that context during mounts and event handling; thread-local storage could also be shared incorrectly across asynchronous executor work.

Exploit preconditions

  • Attack surface: Live WebSocket or SSE endpoints that perform tenant-aware database queries
  • Required access: A valid user or otherwise authorized party able to establish a live connection
  • Trigger point: Component mount or event-handler dispatch on the live path
  • Why exploitation is possible: Tenant context may be absent or incorrectly shared, causing the tenant-aware manager to return an unfiltered queryset instead of denying access

Why this happens

The underlying flaw is a missing authorization check caused by incomplete propagation of tenant context across request-processing paths. Tenant state was stored in threading.local() and initialized only by HTTP middleware, so asynchronous WebSocket and SSE handlers could evaluate queries without a resolved tenant. When the tenant was unavailable, the query layer failed open rather than restricting results, mapping primarily to CWE-862 (Missing Authorization) and also relating to CWE-636 (Not Properly Implemented Access Control).

Potential impact

  • An authenticated user may view records belonging to other tenants
  • Sensitive tenant data could be disclosed through live component updates
  • Cross-tenant information could be exposed repeatedly through event handlers
  • An attacker could use disclosed data to support further account or application compromise

General mitigation guidance

Mitigation generally focuses on treating tenant context as an authorization

boundary across every transport and execution model.

Common defensive patterns include:

  • Binding tenant context per asynchronous task, connection, or request lifecycle
  • Establishing and validating tenant identity before live mounts and every event dispatch
  • Scoping the base queryset once using a trusted, resolved tenant
  • Failing closed with an empty result or explicit authorization denial when tenant context is missing
  • Avoiding mutable thread-global state for asynchronous request isolation
  • Keeping strict isolation enabled by default and applying least privilege to database identities
  • Adding automated checks that detect configurations which disable fail-closed behavior

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis identifying thread-local tenant state in asynchronous code
  • Code review checks confirming tenant binding on HTTP, WebSocket, and SSE paths
  • Tests that exercise missing, stale, and cross-connection tenant contexts
  • Integration tests verifying that live handlers cannot return rows from another tenant
  • Policy enforcement requiring fail-closed behavior for absent authorization context
  • Automated review tools that flag unscoped querysets and authorization decisions based on nullable context

Sources

SourceLink
github.comgithub.com/djust-org/djust/releases/tag/v1.0.7
github.comgithub.com/djust-org/djust/security/advisories/GHSA-3492-cvg7-9mr2

Frequently asked

questions

Exploitation generally requires access to an affected live WebSocket or SSE

endpoint. The connection may need to be authenticated, depending on the

application's access controls.

The described weakness is specific to live paths that did not establish

tenant context through the HTTP-only middleware. HTTP behavior may still

require separate review.

Bind a validated tenant to the current asynchronous execution context before

every live mount and event dispatch, scope all tenant queries to that tenant,

and deny or return no results when the context is missing.

Test every supported transport, avoid shared thread-local authorization state

in asynchronous workflows, keep strict isolation enabled, and enforce

cross-tenant access tests and configuration checks in CI.

Find out what's already
exploitable in your codebase.