Executive brief
djust is a Django framework for building real-time web applications with WebSocket support. The vulnerability allows an authenticated attacker to access tenant data that doesn't belong to them when the application uses host-based or subdomain-based tenant isolation. With default settings, this breaks tenancy entirely (users see no data); with relaxed security settings, it leaks data across tenants. The impact depends on configuration but can expose sensitive customer or organizational information.
Technical details
The vulnerability is an authorization bypass caused by missing host header propagation in WebSocket request reconstruction. The WebSocket handle_mount and ViewRuntime._build_request methods rebuild an HttpRequest using Django's RequestFactory().get(...) without setting the HTTP_HOST header. Consequently, request.get_host() defaults to "testserver" instead of the actual client host, breaking host/subdomain/domain-based TenantResolver logic. Affected code paths are WebSocket live-path operations; regular HTTP paths work correctly. Attack prerequisites include authenticated access (PR:L) and high attack complexity (AC:H), but scope is changed (S:C) as the tenant boundary is crossed. The fix (djust 1.0.7) extracts the handshake Host from the ASGI scope, validates it against ALLOWED_HOSTS, and propagates it into the reconstructed request with the correct TLS scheme. No workaround exists short of upgrading.
Affected products
- djust djust < 1.0.7
Timeline
- 2026-06-22: disclosed: Published to GitHub Advisory Database
- 2026-06-22: patched: djust 1.0.7 released
- 2026-09-16: other: Advisory updated