Summary
A broken object-level authorization vulnerability in djust could allow an authenticated user to view object-scoped Django views they were not permitted to access. The exposure occurred when those views were reached through initial HTTP rendering, SPA URL changes, or embedded live-render paths that bypassed the intended permission checks.
Affected context
The issue affects djust applications that use custom object retrieval and per-object authorization for reactive views. Authorization was applied on WebSocket mount and event flows but could be skipped by initial HTTP GET renders, SPA url_change navigation, or eager and lazy {% live_render %} child views. Views without a custom get_object are generally outside this specific condition.
Exploit preconditions
- Attack surface: HTTP rendering, SPA navigation, and embedded live-render entry points
- Required access: An authenticated application account
- Target condition: An object-scoped view using custom object retrieval and authorization
- Trigger point: Direct page loading, URL-change navigation, or child-view composition
- Why exploitation is possible: These render paths did not consistently invoke the shared per-object authorization check before producing the view
Why this happens
The underlying bug was an incomplete authorization boundary across multiple rendering entry points. Per-object checks were enforced for some WebSocket lifecycle paths but not for HTTP GET, SPA navigation, and embedded child rendering, allowing object references to reach rendering logic without a consistent authorization decision. This maps primarily to CWE-639: Authorization Bypass Through User-Controlled Key, with CWE-862: Missing Authorization also describing the absent check.
Potential impact
- Unauthorized users may view protected object data
- Sensitive fields or related records could be disclosed
- Object-scoped actions may be exposed on affected interaction paths
- Cross-tenant or cross-user data boundaries could be weakened
- An attacker could enumerate object identifiers and access resources they do not own
General mitigation guidance
Mitigation focuses on enforcing object-level authorization at a shared chokepoint that all render and interaction paths must use.
Common defensive patterns include:
- Applying the same authorization decision to HTTP, WebSocket, navigation, and embedded-render flows
- Performing permission checks before object data is rendered or actions are accepted
- Treating object identifiers and route parameters as untrusted input
- Returning consistent denial responses without revealing protected object details
- Using deny-by-default authorization and least-privilege object access
- Adding regression tests for direct loads, SPA navigation, eager embeds, and lazy embeds
- Avoiding object-scoped exposure through unverified entry points until authorization coverage is confirmed
How teams detect issues like this
Detection can combine code review, testing, and runtime monitoring:
- Use static analysis to identify object retrieval paths that lack a subsequent authorization check
- Review whether every render entry point calls the same authorization helper or policy layer
- Test authorized and unauthorized object identifiers across HTTP, WebSocket, SPA, and embedded-view flows
- Add policy checks requiring object-level authorization tests for multi-tenant or user-owned resources
- Monitor denied and successful object accesses for unusual identifier enumeration patterns
- Automated code review tools can help flag inconsistent authorization coverage, but should be supplemented with end-to-end tests

