# CVE-2026-61599: djust unauthenticated arbitrary module import in WebSocket/SSE

Source: https://junglewise.ai/threats/cve-2026-61599-djust-unauthenticated-arbitrary-module-import-in-websocket-sse  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-16. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-61599 · Severity: high · CVSS 4 · Published 2026-09-16

djust is a Python web framework for building real-time interactive views over WebSocket and SSE. An unauthenticated attacker can send a specially crafted mount request to force the server to import and execute arbitrary Python modules that are already installed on the system. This allows an attacker to trigger unintended code execution via module import side effects, crash the service with expensive imports, or discover what modules are installed on the server.

Technologies: [djust (PyPI)](https://junglewise.ai/threats/technologies/djust). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-61599 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-61599 being exploited in the wild.

**How severe is CVE-2026-61599?** High severity, with a CVSS score of 4, published 16 September 2026.

**Which products and versions are affected?** djust (PyPI) < 1.0.7, ECOSYSTEM:introduced=0,fixed=1.0.7.

**Is there a fix for CVE-2026-61599?** Yes. djust (PyPI): upgrade to 1.0.7 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-61599 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-61599?** Check whether you run djust (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- djust (PyPI): upgrade to 1.0.7 or later

  ```sh
  pip install "djust>=1.0.7"
  ```


## Technical details

The vulnerability is an unsafe reflection flaw (CWE-470) in the view-mount resolution logic across three attack surfaces: WebSocket `handle_mount` in websocket.py, SSE mount handling in sse.py, and `ViewRuntime.dispatch_mount` / `_instantiate_view` in runtime.py. All three sinks accept a client-supplied `view` parameter containing a dotted Python module path, which is imported via `__import__()` without prior validation. The LIVEVIEW_ALLOWED_MODULES allowlist that should gate imports is fail-open (disabled when unset, the framework default) and uses loose `startswith` matching, allowing namespace traversal. Since `__import__()` is called before subclass-type checking and before per-view authentication, an unauthenticated WebSocket/SSE client can import any importable module and cause its top-level code (e.g., module-level statements, `__init__.py` code, dependency initialization) to execute. The fix in 1.0.7 introduces a fail-closed resolution gate that only allows imports if the module is already loaded in `sys.modules` or explicitly whitelisted with exact module-segment-boundary matching, and this gate runs before `__import__()` at all three sinks.

## Affected products

- djust-org djust < 1.0.7

## Identifiers

- CVE-2026-61599
- GHSA-7prp-2623-8g45
- PYSEC-2026-4038

## Timeline

- 2026-06-22: disclosed: Security advisory published by djust-org/djust
- 2026-06-22: patched: Fix released in version 1.0.7
- 2026-09-16: advisory: GitHub Advisory Database entry created

## References

- [https://github.com/djust-org/djust/security/advisories/GHSA-7prp-2623-8g45](https://github.com/djust-org/djust/security/advisories/GHSA-7prp-2623-8g45)
- [https://github.com/djust-org/djust/releases/tag/v1.0.7](https://github.com/djust-org/djust/releases/tag/v1.0.7)
- [https://api.github.com/repos/djust-org/djust/security-advisories/GHSA-7prp-2623-8g45](https://api.github.com/repos/djust-org/djust/security-advisories/GHSA-7prp-2623-8g45)

## Related threats

- [djust provides Phoenix LiveView-style reactive server-side rendering for Django with Rust-powered performance. From 0.9.0 until 1.0.10, 1.1.](https://junglewise.ai/threats/cve-2026-113731-djust-provides-phoenix-liveview-style-reactive-server-side)
- [djust template XSS via inherited context safety grant](https://junglewise.ai/threats/djust-template-xss-via-inherited-context-safety-grant-eaaae5cf)
- [djust multiple template-layer cross-site scripting flaws](https://junglewise.ai/threats/djust-six-template-layer-defects-emit-attacker-controlled-markup-54f3f871)
- [djust broken object-level access control (IDOR)](https://junglewise.ai/threats/cve-2026-61596-djust-broken-object-level-access-control-idor)
- [djust host header omission in WebSocket tenant resolution](https://junglewise.ai/threats/cve-2026-61589-djust-host-header-omission-in-websocket-tenant-resolution)
