/

CVE-2026-61594

Severity:

CRITICAL RISK

(9.1)

Missing Authorization (CWE-862) in djust WebSockets

CVE-2026-61594

Deferred

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-306, CWE-862

Impact:

Unauthorized access and privilege escalation

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

A transport-specific authorization bypass in djust allows WebSocket clients to mount Django views without receiving the authorization checks applied during the initial HTTP request. An anonymous or under-privileged client may therefore access protected live views and invoke handlers, including administrative operations, when HTTP-only authorization patterns are used.

Affected context

The issue occurs in djust applications that expose Django views through the live WebSocket transport while relying on authorization enforced only by Django's HTTP dispatch() chain or an HTTP wrapper. This can include authentication and permission mixins, dispatch decorators, custom dispatch guards, and admin staff checks that are not replayed during WebSocket mounting. The risk depends on whether protected views are reachable through the live transport and whether the client lacks the required identity or privileges.

Exploit preconditions

  • Attack surface: djust live WebSocket transport
  • Required access: Network access to the application's WebSocket endpoint; authentication may not be required when the protected view permits anonymous HTTP access only through an authorization mismatch
  • Trigger point: WebSocket mount followed by event or handler dispatch
  • Why exploitation is possible: The WebSocket path uses check_view_auth rather than the complete Django View.dispatch() authorization chain, allowing HTTP-only access controls to be bypassed

Why this happens

The underlying bug is an inconsistent authorization model across transport paths. Authorization checks attached to Django's HTTP dispatch chain or an HTTP-only wrapper were enforced for the initial request but were not reproduced when the same view was mounted over WebSocket. This maps primarily to CWE-862: Missing Authorization, with CWE-306: Missing Authentication for Critical Function also relevant where anonymous clients can reach protected functionality. The insecure pattern is trusting a transport-specific authorization check that does not account for all controls defined on the view.

Potential impact

  • Unauthorized clients may access protected live views
  • Under-privileged users could perform actions reserved for higher-privileged users
  • Administrative list, create, change, or delete handlers could be invoked without the intended staff or permission gate
  • Sensitive application state could be exposed through WebSocket events
  • Application data could be modified or deleted without proper authorization

General mitigation guidance

Mitigation generally focuses on enforcing authorization at the live transport boundary rather than relying on HTTP-only controls.

Common defensive patterns include:

  • Use djust authorization attributes such as login_required, permission_required, and check_permissions when they are honored consistently across transports
  • Apply authentication and permission checks before mounting a live view and before dispatching its events
  • Treat WebSocket connections as an independent authorization surface rather than inheriting trust from the initial HTTP request
  • Define administrative views with an explicit active-staff and permission gate
  • Fail closed when authorization patterns cannot be safely replayed across transports
  • Run authorization-focused tests for anonymous, authenticated, under-privileged, and administrative users over every supported transport

How teams detect issues like this

Organizations can detect this class of issue through:

  • Static analysis that identifies protected Django views exposed through WebSocket routes without transport-aware authorization attributes
  • Code review checks for LoginRequiredMixin, PermissionRequiredMixin, UserPassesTestMixin, dispatch decorators, or custom dispatch() guards used without equivalent live-transport enforcement
  • Integration tests that attempt WebSocket mounts and privileged events as anonymous and under-privileged users
  • Policy checks requiring explicit authentication and authorization declarations for live views
  • Runtime logging and alerting for failed or unexpected WebSocket authorization attempts

Automated review tools can help identify inconsistent authorization paths, but transport-level tests are important for validating actual enforcement.

Sources

SourceLink
github.comgithub.com/djust-org/djust/releases/tag/v1.0.7
github.comgithub.com/djust-org/djust/security/advisories/GHSA-xhhm-f6hp-2qwj

Frequently asked

questions

Yes, when the application exposes the affected live WebSocket endpoint and an attacker can establish a connection. The exact scope depends on network exposure, session handling, and the views available through the transport.

Not always. Anonymous clients may be able to reach protected functionality when authentication checks are enforced only through the HTTP request path. Authenticated users with insufficient permissions may also bypass intended authorization.

Enforce authentication and permissions through djust controls that are evaluated on every transport, including WebSocket mounting and event dispatch. Avoid relying solely on HTTP-only mixins, decorators, or overridden dispatch() methods.

Treat each transport as a separate authorization boundary, require explicit fail-closed policies for unsupported authorization patterns, and test protected operations with multiple identity and privilege levels over both HTTP and WebSocket paths.

Find out what's already
exploitable in your codebase.