{"id":"CVE-2026-61595","aliases":["CVE-2026-61595","GHSA-3492-cvg7-9mr2","PYSEC-2026-4036"],"related":[],"kind":"vulnerability","state":"published","title":"djust: Multi-tenant isolation fails open on the WebSocket/SSE path, disclosing other tenants' data","summary":"djust provides Phoenix LiveView-style reactive server-side rendering for Django with Rust-powered performance. Prior to version 1.0.7, `djust.tenants` isolation was enforced only on the HTTP path. The current tenant was stored in `threading.local()` and set exclusively by the HTTP-only `TenantMiddleware`, so on the live (WebSocket/SSE) path `get_current_tenant()` was always `None` during mount and every event handler — and the tenant-aware `QuerySet` manager failed OPEN (returned the unfiltered queryset, ignoring `STRICT_MODE`), disclosing every tenant's rows to whoever held the socket. `threading.local` was additionally shared across connections on the `sync_to_async` executor thread. This issue is fixed in djust 1.0.7. Tenant storage moved to a `contextvars.ContextVar` (per async task); the resolved tenant is bound around WS/SSE mount and every dispatch; both managers scope the base queryset once and fail CLOSED (`.none()` under the default `STRICT_MODE`); and system check S006 warns when `STRICT_MODE=False`. No known workarounds are available on the live path.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"djust provides Phoenix LiveView-style reactive server-side rendering for Django with Rust-powered performance. Prior to version 1.0.7, `djust.tenants` isolation was enforced only on the HTTP path. The current tenant was stored in `threading.local()` and set exclusively by the HTTP-only `TenantMiddleware`, so on the live (WebSocket/SSE) path `get_current_tenant()` was always `None` during mount and every event handler — and the tenant-aware `QuerySet` manager failed OPEN (returned the unfiltered queryset, ignoring `STRICT_MODE`), disclosing every tenant's rows to whoever held the socket. `threading.local` was additionally shared across connections on the `sync_to_async` executor thread. This issue is fixed in djust 1.0.7. Tenant storage moved to a `contextvars.ContextVar` (per async task); the resolved tenant is bound around WS/SSE mount and every dispatch; both managers scope the base queryset once and fail CLOSED (`.none()` under the default `STRICT_MODE`); and system check S006 warns when `STRICT_MODE=False`. No known workarounds are available on the live path.","source":"cvelist"},{"lang":"en","text":"### Impact\n`djust.tenants` isolation was enforced only on the HTTP path. The current tenant was stored in `threading.local()` and set exclusively by the HTTP-only `TenantMiddleware`, so on the live (WebSocket/SSE) path `get_current_tenant()` was always `None` during mount and every event handler — and the tenant-aware `QuerySet` manager failed **OPEN** (returned the unfiltered queryset, ignoring `STRICT_MODE`), disclosing **every** tenant's rows to whoever held the socket. `threading.local` was additionally shared across connections on the `sync_to_async` executor thread.\n\n### Patches\nFixed in **djust 1.0.7**. Tenant storage moved to a `contextvars.ContextVar` (per async task); the resolved tenant is bound around WS/SSE mount and every dispatch; both managers scope the base queryset once and fail **CLOSED** (`.none()` under the default `STRICT_MODE`); and system check **S006** warns when `STRICT_MODE=False`.\n\n### Workarounds\nNo workaround on the live path short of upgrading.","format":"markdown","source":"ghsa"}],"published":"2026-09-16T15:32:10.000Z","modified":"2026-10-01T17:56:07.207Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N","score":7.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N","score":7.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N","score":7.7,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N","score":7.7,"rating":"HIGH"}],"cwes":["CWE-636","CWE-862"],"affected":[{"ranges":[{"version":"< 1.0.7","status":"affected"}],"vendor":"djust-org","product":"djust","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.0.7"}],"ecosystem":"PyPI","package":"djust","purl":"pkg:pypi/djust","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.0.7"}],"ecosystem":"PyPI","package":"djust","purl":"pkg:pypi/djust","source":"pysec"}],"references":[{"url":"https://github.com/djust-org/djust/security/advisories/GHSA-3492-cvg7-9mr2","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/djust-org/djust/releases/tag/v1.0.7","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/djust-org/djust","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/djust","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-3492-cvg7-9mr2","tags":["advisory"],"sources":["pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-61595","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-09-16T18:18:43.770Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-61595","url":"https://www.cve.org/CVERecord?id=CVE-2026-61595","licence":"CVE Terms of Use","modified":"2026-09-16T18:35:16.208Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-3492-cvg7-9mr2","url":"https://github.com/advisories/GHSA-3492-cvg7-9mr2","licence":"CC-BY-4.0","modified":"2026-10-01T17:56:07.207Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-61595","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-61595","licence":"Public domain","modified":"2026-09-30T17:51:56.193Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-4036","url":"https://osv.dev/vulnerability/PYSEC-2026-4036","licence":"CC-BY-4.0","modified":"2026-10-01T17:45:03.085Z"}],"updatedAt":"2026-11-25T22:59:39.070Z","epss":{"score":0.00377,"percentile":0.33747,"date":"2026-12-02T12:00:21.000Z"}}