/

CVE-2026-55571

Severity:

HIGH RISK

(8.2)

Broken Access Control (CWE-285) in djust LiveView

CVE-2026-55571

Deferred

Vulnerability type

Category:

Broken Access Control

CWE:

CWE-285, CWE-306

Impact:

Unauthorized data access and actions

Severity:

HIGH RISK

(8.2)

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 broken access control vulnerability in djust allows a LiveView WebSocket connection to remain mounted after authentication or authorization denies the initial mount. A client that ignores the redirect may then invoke event handlers without a valid authenticated session, potentially accessing sensitive data or performing unauthorized mutations.

Affected context

The issue occurs in djust deployments using LiveView WebSocket connections where a mount is denied by login-required checks, permission-required checks, or a redirecting on_mount hook. The risk is present when the server sends a navigation frame but does not close the WebSocket, clear the associated view instance, or repeat authorization checks before processing later event frames.

Exploit preconditions

  • Attack surface: LiveView WebSocket event handling
  • Required access: Ability to establish or retain a WebSocket connection and send protocol messages
  • Trigger point: A denied LiveView mount followed by event processing on the still-mounted connection
  • Why exploitation is possible: The connection remains usable after a failed authorization decision, and event handlers do not independently recheck authentication or authorization

Why this happens

The vulnerability results from treating a redirect response as sufficient enforcement of an authorization decision. After a mount is denied, the server sends a navigation frame but retains connection and view state, while subsequent event handling trusts that state without revalidating the user's authentication or permissions. This maps primarily to CWE-285: Improper Authorization; the missing authentication enforcement also relates to CWE-306: Missing Authentication for Critical Function.

Potential impact

  • Unauthorized users may read sensitive application data
  • Attackers could invoke protected event-handler operations
  • Unauthorized mutations may alter application state
  • Sensitive workflows could be triggered without the intended session controls
  • Affected applications may experience confidentiality or integrity loss

General mitigation guidance

Mitigation generally focuses on making authorization state terminal and enforcing it at every sensitive operation.

Common defensive patterns include:

  • Close or invalidate WebSocket connections when a mount is rejected
  • Clear view and session state associated with failed mounts
  • Recheck authentication and authorization before dispatching every protected event
  • Apply server-side authorization inside event handlers rather than relying on client redirects
  • Use deny-by-default policies and least-privilege permissions for LiveView actions
  • Treat client navigation frames as user-interface behavior, not as an access-control boundary

How teams detect issues like this

Organizations can look for:

  • Static analysis patterns where denied authentication or authorization paths return without terminating a session or connection
  • Event dispatch code that invokes handlers without an authentication or permission check
  • Code review signals showing reliance on client-side redirects to enforce server-side access control
  • Integration tests that send events after denied mounts and verify connection invalidation and authorization enforcement
  • Policy checks requiring authorization at sensitive handler boundaries

Automated security review tools may help identify missing checks, state-clearing gaps, and inconsistent enforcement across WebSocket message types.

Sources

SourceLink
github.comgithub.com/djust-org/djust/commit/1ae8aa9246b80477de7ddc4d90319a3b267bef04
github.comgithub.com/djust-org/djust/pull/1780
github.comgithub.com/djust-org/djust/releases/tag/v1.0.4
github.comgithub.com/djust-org/djust/security/advisories/GHSA-xx4j-w367-7247

Frequently asked

questions

It can be exploitable over a LiveView WebSocket when an attacker can establish a connection and continue sending protocol events after a denied mount.

Not necessarily. The weakness specifically concerns event processing that may proceed without rechecking authentication, although deployment-specific controls can affect reachability.

Treat a denied mount as terminal by invalidating the connection and view state, then enforce authentication and authorization again before every protected event.

Keep authorization checks server-side, use deny-by-default policies, test rejected-session behavior with raw clients, and avoid relying on redirects as the sole enforcement mechanism.

Find out what's already
exploitable in your codebase.