Skip to content
CVE-2026-136184

CVE-2026-136184: compose-farm Cross-Site WebSocket Hijacking & CSRF (Unauthenticated Web UI RCE)

Initial Access Execution Lateral Movement Last updated:

Detects exploitation of CVE-2026-136184, a cross-site WebSocket hijacking (CSWSH) and cross-site request forgery vulnerability in basnijholt/compose-farm versions 0.19.0 before 1.22.0. The unauthenticated web UI WebSocket endpoint (src/compose_farm/web/ws.py) performs no Origin validation and no authentication, allowing a malicious web page visited by a victim with network access to compose-farm to open a cross-origin WebSocket and issue privileged commands (deploy/up/down of Docker Compose stacks), yielding remote code execution via arbitrary container orchestration. Detection focuses on WebSocket upgrade requests to the compose-farm UI carrying a cross-site or attacker-controlled Origin header, missing/absent authentication, and subsequent stack-management command execution that correlates with docker compose child-process activity on the host.

Vulnerability Intelligence

Theoretical

What is CVE-2026-136184 CVE-2026-136184: compose-farm Cross-Site WebSocket Hijacking & CSRF (Unauthenticated Web UI RCE)?

CVE-2026-136184: compose-farm Cross-Site WebSocket Hijacking & CSRF (Unauthenticated Web UI RCE) (CVE-2026-136184) maps to the Initial Access and Execution and Lateral Movement tactics — the adversary is trying to get into your network in MITRE ATT&CK.

This page provides production-ready detection logic for CVE-2026-136184: compose-farm Cross-Site WebSocket Hijacking & CSRF (Unauthenticated Web UI RCE), covering the data sources and telemetry it touches: Azure Firewall, Network Proxy, WAF. The queries below are rated critical severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.

MITRE ATT&CK

Tactic
Initial Access Execution Lateral Movement
Microsoft Sentinel / Defender
kusto
// df00tech DF00-3668a7895e · https://df00tech.com/detections/CVE-2026-136184 · licence: https://df00tech.com/detections/licence
let composeFarmPorts = dynamic(["8000", "8080", "80", "443"]);
let suspiciousOrigin = (origin:string, host:string) { isnotempty(origin) and not(tolower(origin) has tolower(host)) };
AZFWApplicationRule
| where TimeGenerated > ago(24h)
| extend p = parse_url(Url)
| where RequestSize > 0
| where Protocol =~ "wss" or Protocol =~ "ws" or Fqdn has "compose"
| extend OriginHeader = tostring(AdditionalFields.Origin), HostHeader = tostring(Fqdn)
| where suspiciousOrigin(OriginHeader, HostHeader)
| where Url has "/ws"
| project TimeGenerated, SourceIp, DestinationIp, Fqdn, Url, OriginHeader, Action
| union (
  CommonSecurityLog
  | where TimeGenerated > ago(24h)
  | where RequestURL has "/ws" or RequestURL has "compose-farm"
  | extend OriginHeader = extract(@"[Oo]rigin:\s*([^\r\n;]+)", 1, AdditionalExtensions)
  | where isnotempty(OriginHeader) and not(tolower(OriginHeader) has tolower(DestinationHostName))
  | project TimeGenerated, SourceIp = SourceIP, DestinationIp = DestinationIP, Fqdn = DestinationHostName, Url = RequestURL, OriginHeader, Action = DeviceAction
)

Identifies WebSocket upgrade requests to a compose-farm '/ws' endpoint where the Origin header does not match the destination host (cross-site WebSocket hijacking), inspecting Azure Firewall and generic CEF/proxy web logs.

critical severity medium confidence

Data Sources

Azure Firewall Network Proxy WAF

Required Tables

AZFWApplicationRule CommonSecurityLog

False Positives

  • Legitimate reverse proxies or API gateways rewriting the Origin header for compose-farm's own UI.
  • Browser extensions or internal dashboards that embed the compose-farm UI in an iframe from a different internal hostname.
  • Security scanners and uptime monitors probing the /ws endpoint with synthetic Origin headers.

Query fingerprint DF00-3668a7895e · licence

Sigma logsource & community rules

The detection logic for CVE-2026-136184: compose-farm Cross-Site WebSocket Hijacking & CSRF (Unauthenticated Web UI RCE) (CVE-2026-136184) above is provided in a vendor-neutral form so you can deploy it on any SIEM. The same logic is shipped here as native KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the following logsource:

logsource:
  category: network_connection
  product: windows

Browse the community-maintained Sigma rules for this technique:


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.

  1. Test 1 Cross-origin WebSocket upgrade to compose-farm /ws

    Expected signal: Proxy/firewall HTTP log of a WebSocket upgrade to /ws with Origin http://evil.example not matching the host.

  2. Test 2 CSRF-style stack deploy via WebSocket command

    Expected signal: docker/dockerd process execution (docker compose up) correlated with the cross-origin WebSocket session.

  3. Test 3 Browser-driven cross-site WebSocket from untrusted page

    Expected signal: Browser process initiating a WebSocket connection to the compose-farm host with a file:// or external Origin.


Response Playbook

Triage

  1. Confirm the compose-farm version on the affected host; versions 0.19.0 through 1.21.5 are vulnerable and 1.22.0 is fixed. Check `pip show compose-farm` or the running container image tag.
  2. Review the WebSocket upgrade request's Origin header against the compose-farm host/FQDN, a mismatch with no corresponding authenticated session is the primary indicator of CSWSH.
  3. Correlate the time of the cross-origin /ws connection with docker compose up/down/deploy activity and container state changes on the host.
  4. Identify the victim client IP that opened the WebSocket and determine whether that user recently browsed to an untrusted external site (CSWSH requires a victim with network access to compose-farm).

Containment

  1. Block external and untrusted-network access to the compose-farm UI and WebSocket port at the firewall/reverse proxy immediately; restrict to a trusted management segment or VPN.
  2. Upgrade compose-farm to 1.22.0 or later, which adds Origin validation and authentication to the WebSocket endpoint.
  3. If upgrade is not immediately possible, place the UI behind an authenticating reverse proxy that enforces Origin checks and drops cross-site WebSocket upgrades.

Evidence Collection

  1. Capture proxy/firewall logs showing the /ws upgrade request, source IP, Origin header, and Host header.
  2. Collect docker/dockerd and compose-farm application logs and the process execution history (docker compose commands, container create/start events) for the exposure window.
  3. Snapshot affected container images and any newly created or modified Compose stacks for forensic comparison.

Escalation Criteria

  • ! Escalate to incident response if docker compose execution or new container deployment correlates with a confirmed cross-origin WebSocket connection, this indicates achieved RCE.
  • ! Escalate if the compose-farm UI was reachable from the internet or an untrusted network, as the exposure window and victim population are then unbounded.

Investigation Guide

Forensic Artifacts

  • > Reverse-proxy/firewall logs containing the WebSocket upgrade with mismatched Origin and Host headers.
  • > Docker daemon event log (`docker events`) and container create/start records around the exposure time.
  • > compose-farm application logs recording stack deploy/up/down operations and the originating session.

Tuning Guidance

Baseline the legitimate hostnames/FQDNs and reverse-proxy Origins used to reach the compose-farm UI, then allowlist those Origin/Host pairs to suppress benign mismatches. If the UI is correctly served from a single hostname, any Origin differing from that hostname on the /ws path is high-fidelity. After upgrading to 1.22.0, expect cross-origin upgrades to be rejected server-side; shift the detection to alert on rejected upgrade attempts as a probing indicator.


Hunting Queries

Hunt for cross-origin WebSocket upgrade attempts against compose-farm '/ws' endpoints across proxy/firewall telemetry.

Hunting — KQL
kql
// df00tech DF00-3668a7895e · https://df00tech.com/detections/CVE-2026-136184 · licence: https://df00tech.com/detections/licence
CommonSecurityLog | where RequestURL has "/ws" | extend OriginHeader = extract(@"[Oo]rigin:\s*([^\r\n;]+)", 1, AdditionalExtensions) | where isnotempty(OriginHeader) and not(tolower(OriginHeader) has tolower(DestinationHostName)) | project TimeGenerated, SourceIP, DestinationHostName, RequestURL, OriginHeader
Hunting — SPL
spl
``` df00tech DF00-3668a7895e · https://df00tech.com/detections/CVE-2026-136184 · licence: https://df00tech.com/detections/licence ```
index=proxy sourcetype="stream:http" uri="*/ws*" | eval origin=coalesce(http_origin,origin_header) | rex field=origin "^[a-z]+://(?<origin_host>[^/:]+)" | where isnotnull(origin) AND origin_host!=dest_host | stats count by src_ip dest_host origin

Atomic Red Team Tests

Test 1 Cross-origin WebSocket upgrade to compose-farm /ws
linux

Simulates a CSWSH attempt by opening a WebSocket to the compose-farm /ws endpoint with an attacker-controlled Origin header, as a malicious page's browser would.

Command

bash
python3 -c "import websocket; ws=websocket.create_connection('ws://127.0.0.1:8000/ws', header=['Origin: http://evil.example'], suppress_origin=True); print(ws.recv()); ws.close()"

Cleanup

bash
echo 'No persistent artifacts; close any lingering WebSocket connections'

Expected Telemetry

Proxy/firewall HTTP log of a WebSocket upgrade to /ws with Origin http://evil.example not matching the host.

Expected Detection

KQL/SPL cross-origin /ws detections fire on the Origin/Host mismatch.

Test 2 CSRF-style stack deploy via WebSocket command
linux

Sends a stack management command over the hijacked WebSocket to trigger a docker compose operation, emulating RCE via orchestration.

Command

bash
python3 -c "import websocket,json; ws=websocket.create_connection('ws://127.0.0.1:8000/ws', header=['Origin: http://evil.example']); ws.send(json.dumps({'action':'deploy','stack':'test'})); print(ws.recv()); ws.close()"

Cleanup

bash
docker compose -p test down 2>/dev/null || true

Expected Telemetry

docker/dockerd process execution (docker compose up) correlated with the cross-origin WebSocket session.

Expected Detection

EQL sequence and CrowdStrike CQL compose_exec detections fire on the docker compose child process following the /ws upgrade.

Test 3 Browser-driven cross-site WebSocket from untrusted page
windows

Uses a headless browser loading an attacker HTML page that opens a WebSocket to compose-farm, reproducing the end-to-end CSWSH delivery path.

Command

powershell
powershell -c "$html='<script>var w=new WebSocket(\"ws://127.0.0.1:8000/ws\");w.onopen=function(){w.send(\"{\\\"action\\\":\\\"list\\\"}\")}</script>'; Set-Content -Path $env:TEMP\cswsh.html -Value $html; Start-Process msedge.exe (Join-Path $env:TEMP 'cswsh.html')"

Cleanup

powershell
Remove-Item $env:TEMP\cswsh.html -ErrorAction SilentlyContinue

Expected Telemetry

Browser process initiating a WebSocket connection to the compose-farm host with a file:// or external Origin.

Expected Detection

Cross-origin /ws upgrade detections fire on the mismatched/absent same-origin Origin header.

Related Detections

Browse by tactic

Full ATT&CK matrix Search all detections