CVE-2026-61593
nicheCross-Site Request Forgery in djust SSE transport lets attackers act as logged-in users
djust, a Python (pip) LiveView framework, left its Server-Sent-Events transport open to cross-site request forgery: the SSE client-to-server POST endpoints were decorated @csrf_exempt and the SSE GET stream endpoint performed no Origin check. An attacker hosts a web page that forces a victim's browser to GET the stream URL (which creates and mounts a LiveView using the victim's cookies) and then POSTs to the message endpoint with credentials included, using a client-chosen session_id and a text/plain JSON body that qualifies as a CORS simple request with no preflight. This lets the attacker fire state-changing, victim-authenticated event handlers on the server, with high confidentiality and integrity impact but no availability impact (CVSS 3.1: 8.1). Any djust application that exposes the SSE transport to authenticated users is affected. No public proof-of-concept or in-the-wild exploitation is known, and the flaw is not listed in CISA KEV.
What to do: Upgrade to djust 1.0.7, which validates the request Origin against ALLOWED_HOSTS on all three SSE endpoints (rejecting cross-origin requests with 403) and requires Content-Type: application/json on POST endpoints (415 otherwise). If upgrading is not immediately possible, disable the SSE transport or place a reverse proxy in front of the SSE endpoints that enforces an Origin allowlist. Audit any djust application that uses SSE with cookie-authenticated LiveViews, since only those deployments are exposed to this flaw.
| djust (open-source project) djust | All versions prior to 1.0.7 with the SSE transport enabled (pip ecosystem) |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
djust provides Phoenix LiveView-style reactive server-side rendering for Django with Rust-powered performance. Prior to version 1.0.7, the SSE client→server POST endpoints are `@csrf_exempt` and the SSE GET stream endpoint had no Origin check, so a cross-origin page could drive a victim-cookie-authenticated SSE session: force the victim's browser to GET the stream URL (which creates and mounts a LiveView as the victim) and POST to the message endpoint with `credentials: include` to fire state-changing event handlers as the victim. The URL `session_id` is client-chosen (validated only for UUID *format*), so it is not a CSRF token, and a JSON body sent as `text/plain` is a CORS simple request with no preflight. The issue is fixed in 1.0.7. All three SSE endpoints validate the request `Origin` against `ALLOWED_HOSTS` (mirroring the WebSocket CSWSH defense) and reject cross-origin requests with 403; the POST endpoints additionally require `Content-Type: application/json` (415 otherwise), closing the `text/plain` simple-request bypass. As a workaround, disable the SSE transport, or front it with a proxy that enforces an Origin allowlist.
- Ecosystems
- pip
- Weakness
- CWE-352
- Vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
- GHSA
- GHSA-pg97-jvmf-qfvc (high)
In the news0 stories
No ingested article mentions this CVE yet.