CVE-2026-61593: djust has Cross-Site Request Forgery on the Server-Sent-Events transport: a cross-origin page can drive a victim-authenticated SSE session

Published Sep 16, 2026
·
Updated

Impact The SSE client→server POST endpoints are @csrfexempt 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 sessionid 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.

Patches Fixed in djust 1.0.7. All three SSE endpoints validate the request Origin against ALLOWEDHOSTS (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.

Workarounds Disable the SSE transport, or front it with a proxy that enforces an Origin allowlist.

Other sources

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 @csrfexempt 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 sessionid 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 ALLOWEDHOSTS (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.

MITRE

Affected Software

1 affected componentFixes available
pip/djust<1.0.7
1.0.7

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/djust to a version that resolves this vulnerability.

    Fixed in 1.0.7
  2. Upgrade

    Upgrade djust to a version that resolves this vulnerability.

    Fixed in 1.0.7
  3. Configuration

    Disable the SSE transport (workaround) or otherwise ensure SSE is not accessible cross-origin.

    djust SSE transport enable_sse_transport = false
  4. Compensating control

    If SSE must remain enabled, front it with a proxy that enforces an Origin allowlist (so requests with disallowed Origin are rejected).

Event History

Sep 16, 2026
Advisory Published
via GitHub·03:45 PM
Data Sourced
via GitHub·03:45 PM
DescriptionSeverityWeaknessAffected Software
CVE Published
via MITRE·03:46 PM
Data Sourced
via MITRE·03:46 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed?

djust deployments using the SSE transport before version 1.0.7 are exposed. The issue affects the SSE stream GET endpoint and the client-to-server POST endpoints.

2

What does an attacker need to exploit this?

An attacker needs a victim who is authenticated to the target application with cookies and who visits an attacker-controlled cross-origin page. That page can cause the victim browser to create an SSE-backed LiveView session and send state-changing events using the victim's credentials.

3

Does the client-supplied session_id prevent exploitation?

No. The session_id is chosen by the client and is validated only as a UUID-format value, so it does not act as a CSRF token.

4

What can be done if upgrading is not immediately possible?

Disable the SSE transport, or place it behind a proxy that enforces an Origin allowlist. The fixed release validates Origin against ALLOWED_HOSTS for all SSE endpoints.

5

How does version 1.0.7 block the attack?

Version 1.0.7 rejects cross-origin requests to all SSE endpoints with HTTP 403 and requires application/json on the POST endpoints, returning HTTP 415 for other content types. This prevents the text/plain CORS simple-request bypass.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203