Skip to content
CVE-2026-138286 Microsoft Sentinel · KQL

Detect CVE-2026-138286: AutoCua ComputerUseAgent Authentication Bypass in _is_owner_chat (Telegram Remote-Control Service, macOS) in Microsoft Sentinel

Detects potential exploitation of CVE-2026-138286, an improper authentication (CWE-287, CVSS 10.0) vulnerability in the ComputerUseAgent AutoCua project up to version 0.1.9. The flaw is in the `_is_owner_chat` function of `AutoCua/mac/remote_connection/telegram/service.py`, part of the Telegram Remote-Control Service, which checks whether an inbound control message comes from the authorized owner before accepting remote-control commands on the macOS host. When the stored owner is missing, the check treats the sender as the first owner and accepts the message. An unauthenticated remote attacker can then issue commands to the AutoCua agent and drive the computer-use automation (keystrokes, clicks, shell and screen actions) as the owner. Exploit status is theoretical; no public proof of concept was listed as of disclosure on 2026-11-29. The fix shipped in v0.2.0 (commit c3191fa). Detection focuses on AutoCua process execution on macOS, inbound network sessions, owner-identity mismatches, and automation command bursts following remote connections.

MITRE ATT&CK

Tactic
Initial Access Lateral Movement

KQL Detection Query

Microsoft Sentinel (KQL)
kusto
// df00tech DF00-f220245cc4 · https://df00tech.com/detections/CVE-2026-138286 · licence: https://df00tech.com/detections/licence
let autocua_procs = dynamic(["remote_connect", "autocua", "AutoCua"]);
DeviceProcessEvents
| where Timestamp > ago(7d)
| where ProcessCommandLine has_any (autocua_procs) or InitiatingProcessCommandLine has_any (autocua_procs)
| where FileName in~ ("python", "python3", "node") or ProcessCommandLine has "remote_connect"
| join kind=inner (
    DeviceNetworkEvents
    | where Timestamp > ago(7d)
    | where RemoteIPType == "Public"
    | where ActionType == "InboundConnectionAccepted" or ActionType == "ConnectionSuccess"
) on DeviceId
| where abs(datetime_diff('second', Timestamp, Timestamp1)) < 120
| project Timestamp, DeviceId, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessCommandLine, RemoteIP, RemotePort, LocalPort
| order by Timestamp desc
critical severity medium confidence

Correlates AutoCua process execution on macOS endpoints with inbound public network connections within a 2-minute window, surfacing remote control sessions that may exploit the _is_owner_chat authentication bypass.

Data Sources

Microsoft Defender for EndpointDeviceProcessEventsDeviceNetworkEvents

Required Tables

DeviceProcessEventsDeviceNetworkEvents

False Positives & Tuning

  • Legitimate AutoCua owner operating their own agent remotely over a trusted connection
  • Internal automation or testing of the AutoCua remote-control feature by developers
  • Security scanners or asset-discovery tools probing the AutoCua listening port

Other platforms for CVE-2026-138286


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 Simulate AutoCua remote_connect execution on macOS

    Expected signal: ProcessRollup2 / DeviceProcessEvents record with FileName or CommandLine containing remote_connect on a Mac host.

  2. Test 2 Simulate inbound remote-control connection to AutoCua listener

    Expected signal: NetworkConnectIP4 / DeviceNetworkEvents inbound connection event on port 8765 on the macOS host.

  3. Test 3 Simulate owner-identity mismatch control message

    Expected signal: Log entry in the AutoCua log containing a control message from a sender that is not the owner.


Response Playbook

Triage

  1. Confirm the AutoCua version running on the affected macOS host by inspecting the installed package or git tag. Versions up to 0.1.9 are vulnerable; v0.2.0 (commit c3191fa) contains the fix.
  2. Identify the source IP(s) that connected to the AutoCua agent and determine whether they belong to the legitimate owner's known devices or networks.
  3. Review AutoCua agent logs for control messages accepted around the connection time and check whether _is_owner_chat validation passed for a non-owner identity.
  4. Correlate the inbound session with any later automation actions (keystrokes, clicks, shell commands, screenshots) to assess whether commands ran.

Containment

  1. Isolate the affected macOS host from the network to stop any active remote-control session.
  2. Stop the AutoCua agent and block the listening port at the host and perimeter firewall until patched.
  3. Upgrade AutoCua to v0.2.0 or later, which fixes the _is_owner_chat authentication check.

Evidence Collection

  1. Preserve AutoCua application logs, the Telegram Remote-Control Service logs, and macOS Unified Log entries covering the suspected session window.
  2. Capture process execution records (osquery/EDR) and network connection records for the AutoCua process, including source IPs and ports.
  3. Snapshot any files, scripts, or screen captures created or modified by the agent during the session.

Escalation Criteria

  • !Escalate to incident response if the connecting source IP is external or untrusted and automation commands ran after the session.
  • !Escalate if evidence shows an owner-identity mismatch (a non-owner message accepted by _is_owner_chat) or if credentials, sensitive files, or additional hosts were accessed via the agent.

Investigation Guide

Forensic Artifacts

  • >AutoCua Telegram Remote-Control Service logs and control message records on macOS
  • >macOS Unified Log entries and EDR process and network telemetry for the AutoCua process
  • >Artifacts of automation actions: shell history, created files, screenshots, and accessibility or keystroke events

Tuning Guidance

Baseline the legitimate owner's source IP ranges and known management networks for AutoCua hosts, then exclude them to reduce noise. If AutoCua is only used locally, alert on any inbound external connection to its port. Narrow the process match to the exact AutoCua binary or script path in your environment, and tighten the correlation window if owner sessions are long-lived. Treat alerts as high-fidelity on hosts still running versions up to 0.1.9.


Hunting Queries

Hunts for external hosts connecting to AutoCua agents across the fleet over the last 30 days to spot unauthorized remote-control attempts.

Hunting — KQL
kql
// df00tech DF00-f220245cc4 · https://df00tech.com/detections/CVE-2026-138286 · licence: https://df00tech.com/detections/licence
DeviceNetworkEvents | where Timestamp > ago(30d) | where InitiatingProcessCommandLine has_any ("remote_connect","AutoCua") | where RemoteIPType == "Public" | summarize count() by DeviceName, RemoteIP, RemotePort | order by count_ desc
Hunting — SPL
spl
``` df00tech DF00-f220245cc4 · https://df00tech.com/detections/CVE-2026-138286 · licence: https://df00tech.com/detections/licence ```
index=network sourcetype="*:firewall" direction=inbound ("remote_connect" OR "AutoCua") | stats count by host src_ip dest_port | sort -count

Atomic Red Team Tests

Test 1 Simulate AutoCua remote_connect execution on macOS
macos

Launches a stub process named remote_connect to generate the process-execution telemetry the detection keys on.

Command

bash
cp /bin/sleep /tmp/remote_connect && /tmp/remote_connect 30 &

Cleanup

bash
pkill -f /tmp/remote_connect; rm -f /tmp/remote_connect

Expected Telemetry

ProcessRollup2 / DeviceProcessEvents record with FileName or CommandLine containing remote_connect on a Mac host.

Expected Detection

Process-match portion of the detection fires on the remote_connect process name.

Test 2 Simulate inbound remote-control connection to AutoCua listener
macos

Opens a local listener mimicking the AutoCua port and connects to it to generate inbound network telemetry correlated with the agent process.

Command

bash
python3 -c "import socket,threading,time;s=socket.socket();s.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1);s.bind(('0.0.0.0',8765));s.listen(1);threading.Thread(target=lambda:(time.sleep(1),socket.create_connection(('127.0.0.1',8765)).close())).start();c,_=s.accept();c.close();s.close()"

Cleanup

bash
lsof -ti tcp:8765 | xargs -r kill 2>/dev/null; true

Expected Telemetry

NetworkConnectIP4 / DeviceNetworkEvents inbound connection event on port 8765 on the macOS host.

Expected Detection

Network-correlation portion of the detection matches the inbound session when paired with the AutoCua process within the time window.

Test 3 Simulate owner-identity mismatch control message
macos

Writes a mock AutoCua control message bearing a non-owner sender id, emulating an _is_owner_chat bypass attempt for log-based detection validation.

Command

bash
mkdir -p /tmp/autocua && printf '{"sender":"attacker-not-owner","type":"control","action":"shell","cmd":"whoami"}\n' >> /tmp/autocua/remote_connect.log

Cleanup

bash
rm -rf /tmp/autocua

Expected Telemetry

Log entry in the AutoCua log containing a control message from a sender that is not the owner.

Expected Detection

Log-review or hunting step identifies the owner-identity mismatch indicative of the _is_owner_chat authentication bypass.

Related Detections