CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-61593

CVE-2026-61593: Cross-Site Request Forgery in djust Server-Sent Events Transport Layer

Alon Barad
Alon Barad
Software Engineer

Sep 16, 2026·5 min read·4 visits

Executive Summary (TL;DR)

A validation omission in djust allows attackers to hijack reactive user sessions via cross-site requests, mounting unauthorized server-side components and executing state-changing handlers.

CVE-2026-61593 is a high-severity Cross-Site Request Forgery (CSRF) vulnerability discovered in the Server-Sent Events (SSE) transport layer of djust, an open-source framework that implements Phoenix LiveView-style reactive server-side rendering for Django applications. Before version 1.0.7, a lack of origin verification on the SSE stream endpoint, combined with @csrf_exempt decorators on message POST endpoints, allowed an attacker to hijack active client sessions through cross-origin interactions.

Vulnerability Overview

The djust library provides real-time reactive UI rendering in Django applications by maintaining a continuous state synchronization channel. This channel is split into two main endpoints: a Server-Sent Events (SSE) GET stream for downstream updates and a series of POST endpoints for client-to-server action messages.

Because standard web browsers automatically send authentication cookies along with credentialed cross-origin GET requests, the lack of origin validation on the SSE stream endpoint allowed malicious web pages to initiate sessions on behalf of authenticated users.

At the same time, the POST message endpoints were decorated with @csrf_exempt to simplify JSON transmission. This combined structure meant that once a session was established, an attacker could dispatch cross-origin requests to trigger server-side handlers without triggering Django's built-in CSRF defenses.

Root Cause Analysis

The underlying vulnerability results from three distinct architecture design flaws. First, the GET endpoint used to establish the SSE stream did not perform any validation on the HTTP Origin header, allowing any external origin to request connection initialization with credentials.

Second, the framework relied on client-generated UUIDs as the reactive session identifiers rather than server-issued, cryptographically secure tokens. The server validated the session ID format via regular expression matching but did not verify whether the session ID was created by an authorized handshake.

Third, the client-to-server POST endpoints accepted request bodies with a Content-Type header set to text/plain. Browser security policies allow cross-origin POST requests with simple content types like text/plain to bypass CORS preflight checks, meaning the browser sent the payload and the session cookies directly to the target server.

Code Analysis

The vulnerable routing and view logic did not inspect incoming headers before instantiating or finding the active LiveView session.

# Vulnerable Implementation (< 1.0.7)
from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponse, JsonResponse
import json
 
@csrf_exempt
def sse_message(request, session_id):
    # VULNERABILITY 1: Bypasses CSRF checks entirely
    # VULNERABILITY 2: Does not validate request.headers.get('Origin')
    # VULNERABILITY 3: Does not enforce application/json Content-Type
    payload = json.loads(request.body)
    trigger_event(session_id, payload)
    return JsonResponse({"status": "success"})

The patched version introduces strict origin validation against the configured django.conf.settings.ALLOWED_HOSTS and mandates the application/json content type.

# Patched Implementation (>= 1.0.7)
from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponseForbidden, HttpResponse
from django.conf import settings
from urllib.parse import urlparse
 
@csrf_exempt
def sse_message_patched(request, session_id):
    origin = request.headers.get('Origin')
    if origin:
        parsed_origin = urlparse(origin).netloc
        # Fix 1: Validate that the origin matches allowed hosts
        if parsed_origin not in settings.ALLOWED_HOSTS:
            return HttpResponseForbidden("Invalid Origin")
            
    # Fix 2: Require strict content-type to trigger CORS preflight
    content_type = request.content_type
    if content_type != 'application/json':
        return HttpResponse("Unsupported Media Type", status=415)
        
    payload = json.loads(request.body)
    trigger_event(session_id, payload)
    return JsonResponse({"status": "success"})

Exploitation Methodology

An attacker can exploit this vulnerability by hosting a malicious page and enticing an authenticated user of the vulnerable application to visit it. The attack requires no special privileges beyond web network access.

First, the malicious page runs JavaScript that opens a credentialed GET request to the djust SSE stream path, providing a random but valid UUID. The server parses the victim's session cookies, authenticates the request, and initializes a LiveView state linked to that UUID.

Second, the attacker sends a POST request containing the event handler execution payload to the message endpoint. The request is sent with the Content-Type header set to text/plain to bypass the browser's CORS preflight rules, while still delivering JSON content which the server processes without CSRF validation.

Impact Assessment

The direct impact is complete control over the victim's application session. An attacker can trigger any state-changing action that the active Django user is authorized to perform, including account modifications, data entry, and sensitive administrative tasks.

Because the SSE endpoint can also leak state updates back to the client-side channel under specific conditions, the confidentiality of user-specific state data is compromised. The CVSS score of 8.1 reflects high integrity and confidentiality impacts combined with low attack complexity and no requirement for prior privileges.

Remediation and Mitigation

The primary remediation path is upgrading the djust package to version 1.0.7 or later, which implements strict Origin header matching and Content-Type enforcement.

If upgrading is not immediately possible, deploy a reverse proxy or Web Application Firewall (WAF) in front of the application. The proxy must be configured to inspect all incoming requests destined for the djust SSE paths and block any request where the Origin header does not match the application's domain, or where a POST request has a Content-Type other than application/json.

Technical Appendix

CVSS Score
8.1/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N

Affected Systems

Applications utilizing the djust framework for Django reactive server-side rendering

Affected Versions Detail

Product
Affected Versions
Fixed Version
djust
djust-org
< 1.0.71.0.7
AttributeDetail
CWE IDCWE-352: Cross-Site Request Forgery (CSRF)
Attack VectorNetwork
CVSS v3.1 Score8.1
ImpactHigh (Confidentiality, Integrity)
Exploit Statuspoc
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1189Drive-by Compromise
Initial Access
CWE-352
Cross-Site Request Forgery (CSRF)

The web application does not, or cannot, sufficiently verify whether a well-formed, valid, consistent request was intentionally sent by the user.

References & Sources

  • [1]GitHub Security Advisory GHSA-pg97-jvmf-qfvc
  • [2]djust v1.0.7 Release
  • [3]CVE Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 1 hour ago•CVE-2026-68904
7.0

CVE-2026-68904: Uncontrolled Resource Consumption (Socket Leak and Reconnection Storm) in node-opcua

CVE-2026-68904 is a high-severity Denial of Service (DoS) vulnerability in the node-opcua library. It arises from a logical flaw in the keepalive session manager combined with incorrect socket termination at the TCP transport layer. When server-side anomalies occur, affected clients fall into an infinite, high-frequency reconnection loop. Due to the use of graceful teardown (socket.end) instead of immediate termination (socket.destroy) during negotiation failures, sockets remain open in the FIN-WAIT-2 state. This accumulates system file descriptors and memory, eventually crashing the client process.

Amit Schendel
Amit Schendel
6 views•8 min read
•about 3 hours ago•CVE-2026-81192
7.0

CVE-2026-81192: Local Code Execution via Untrusted Search Path in OpenTelemetry.Resources.Host

An untrusted search path vulnerability (CWE-426) in the OpenTelemetry.Resources.Host NuGet package on macOS allows a local attacker to execute arbitrary code with elevated privileges by hijacking standard system commands such as sh and ioreg.

Alon Barad
Alon Barad
4 views•6 min read
•about 4 hours ago•CVE-2026-61598
7.1

CVE-2026-61598: Remote State Modification via Mass Assignment in djust Framework

CVE-2026-61598 is a high-severity mass-assignment vulnerability (CWE-915) affecting the Python package djust prior to version 1.0.7. An authenticated client can supply arbitrary parameter names to modify public view attributes on the server via WebSocket events, leading to unauthorized state manipulation, authorization bypass, or price tampering.

Alon Barad
Alon Barad
8 views•6 min read
•about 5 hours ago•CVE-2026-69213
7.5

CVE-2026-69213: Uncontrolled Resource Consumption (DoS) in http4s Ember HTTP/2 Implementation

An uncontrolled resource consumption vulnerability (CVE-2026-69213) in the http4s Ember HTTP/2 server and client implementations allows unauthenticated remote attackers to trigger an OutOfMemoryError (OOM) and cause a Denial of Service (DoS) by exploiting unbounded outbound queues.

Amit Schendel
Amit Schendel
3 views•7 min read
•about 5 hours ago•CVE-2026-60137
5.9

CVE-2026-60137: SQL Injection in WordPress Core WP_Query Class via author__not_in Parameter

CVE-2026-60137 is a critical SQL injection vulnerability in the Core component of WordPress. The flaw occurs within the WP_Query class during the processing of the author__not_in parameter, where user-supplied array inputs are constructed into a SQL string without strict integer type-casting. When chained with CVE-2026-63030, an unauthenticated remote attacker can exploit this SQL injection to read database values, extract administrator credential hashes, or modify administrative options to execute arbitrary PHP code on the server.

Amit Schendel
Amit Schendel
5 views•5 min read
•about 6 hours ago•CVE-2026-69214
6.8

CVE-2026-69214: Session Fixation via Arbitrary Set-Cookie Domain Acceptance in http4s CookieJar Middleware

A validation flaw exists in the CookieJar client middleware of the http4s library. Prior to versions 0.23.35 and 1.0.0-M47, the middleware trusts server-supplied Domain attributes in HTTP Set-Cookie response headers without confirming that the domain matches the origin host. A malicious server can leverage this to register unauthorized cookies targeting different domains, creating potential session fixation or cookie poisoning vectors.

Alon Barad
Alon Barad
4 views•5 min read