GHSA-3492-cvg7-9mr2: High severity pip/djust vulnerability

Published Sep 16, 2026
·
Updated

Impact djust.tenants isolation was enforced only on the HTTP path. The current tenant was stored in threading.local() and set exclusively by the HTTP-only TenantMiddleware, so on the live (WebSocket/SSE) path getcurrenttenant() was always None during mount and every event handler — and the tenant-aware QuerySet manager failed OPEN (returned the unfiltered queryset, ignoring STRICTMODE), disclosing every tenant's rows to whoever held the socket. threading.local was additionally shared across connections on the synctoasync executor thread.

Patches Fixed in djust 1.0.7. Tenant storage moved to a contextvars.ContextVar (per async task); the resolved tenant is bound around WS/SSE mount and every dispatch; both managers scope the base queryset once and fail CLOSED (.none() under the default STRICTMODE); and system check S006 warns when STRICTMODE=False.

Workarounds No workaround on the live path short of upgrading.

Affected Software

1 affected componentFixes available
pip/djust<1.0.7
1.0.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/djust to a version that resolves this vulnerability.

    Fixed in 1.0.7
  2. Upgrade

    Upgrade djust to a version that resolves this vulnerability.

    Fixed in 1.0.7
  3. Configuration

    Ensure djust.tenants isolation enforces fail CLOSED behavior: set STRICT_MODE=True (note: system check S006 warns when STRICT_MODE=False).

    djust.tenants STRICT_MODE = true
  4. Configuration

    Apply the fix that moves tenant storage to contextvars.ContextVar per async task and scopes the base queryset once per WS/SSE mount and dispatch, failing CLOSED via .none() under default STRICT_MODE.

    djust.tenants tenant isolation implementation = contextvars.ContextVar
  5. Compensating control

    As no live-path workaround exists short of upgrading, restrict live WebSocket/SSE access so only authorized tenants can connect until djust 1.0.7 is deployed.

Event History

Sep 16, 2026
Advisory Published
via GitHub·03:32 PM
Data Sourced
via GitHub·03:32 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are exposed to this issue?

Deployments using djust live paths, specifically WebSocket or SSE connections, are exposed. HTTP requests use TenantMiddleware and are not the affected path described here.

2

What does an attacker need to exploit it?

The attacker needs to hold a live WebSocket or SSE connection. On that path, tenant context was not set during mounting or event handling, causing tenant-aware querysets to return unfiltered rows.

3

Does enabling STRICT_MODE protect affected live connections?

No. On the affected live path, the tenant-aware QuerySet manager failed open and returned an unfiltered queryset even when STRICT_MODE was enabled.

4

What can be done if an upgrade cannot be applied immediately?

No workaround is available for the live path short of upgrading. Upgrade djust to 1.0.7, which binds tenant context for WebSocket/SSE processing and changes the managers to fail closed.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203