Skip to content

Security: m3lonxd/computer-use-linux

Security

SECURITY.md

Security Policy

Supported Versions

Security updates are applied to the latest release series on master:

Version Supported
0.7.x (master) Yes
< 0.7 No (upgrade to latest 0.7.x)

Security Model and Permission Boundaries

Computer Use Linux operates strictly within the signed-in user's graphical session without requiring root or administrator privileges:

  • Desktop session privileges: Any local tool or AI agent allowed to invoke the CLI, MCP server (computer-use-linux-mcp), or HTTP adapter (computer-use-linux-http) inherits the ability to capture screenshots, read accessibility trees (AT-SPI / UIA / AX), inject keyboard and mouse events, and interact with open terminals (Konsole, tmux, Terminal.app, iTerm2, Windows console) inside that user session. Treat agent access to Computer Use Linux as equivalent to interactive desktop access for that account.
  • OS consent and isolation boundaries:
    • Linux (Wayland): Input injection and screen capture rely on org.freedesktop.portal.RemoteDesktop and ScreenCast (prompting once per session unless restored via the user-owned restore token in ~/.config/computer-use-linux/portal.json), alongside compositor IPC (KWin D-Bus scripts, Sway IPC, Hyprland IPC).
    • Linux (X11): Uses XTEST and EWMH within the active DISPLAY session.
    • macOS: Subject to per-user TCC permissions for Accessibility and Screen Recording.
    • Windows: Subject to User Interface Privilege Isolation (UIPI); non-elevated processes cannot drive elevated windows.
  • Ref verification is a safety check, not a sandbox: Identity-proof refs (@snapshot:element, STALE_REF, AMBIGUOUS_TARGET) prevent misclicks caused by UI drift, not malicious callers.
  • HTTP adapter (adapters/http/server.py):
    • Binds to 127.0.0.1 by default. Non-loopback bindings are refused unless a bearer token of at least 24 characters is configured (CUL_TOKEN or --token-file, such as the 0600 token generated by deploy/install-service.sh).
    • Uses constant-time token comparison, caps request bodies at 4 MB, rejects browser requests carrying Origin or cross-site Sec-Fetch-Site headers (unless explicitly opted in via --allow-origin), and requires a local Host header when running without a token to mitigate DNS rebinding.
    • Use an SSH tunnel (ssh -N -L 8788:127.0.0.1:8788 ...) or --tls-cert / --tls-key when connecting from another machine.

Local Daemon UNIX Socket Isolation

Background daemons and IPC helpers isolate sockets and state per user account:

  • Runtime directory: UNIX domain sockets and lock files live under $XDG_RUNTIME_DIR when set. When falling back to temporary directories, platforms/base.py (private_dir()) and portal_input.py create a per-user directory (/tmp/computer-use-linux-<uid> in portal_input.py; <tempdir>/computer-use-linux-<user> via runtime_dir()), verify via lstat that it is a real directory owned by os.getuid() (not a symlink or pre-created by another user), and enforce 0o700 permissions. The CLI service helper (adapters/cli/computer_use_linux_cli.py) likewise creates its runtime directory with 0o700.
  • Socket permissions without bind-to-chmod races: The CLI service daemon (_serve), Wayland portal daemon (portal_input.py), and visible cursor daemon (agent_cursor.py) bind their AF_UNIX sockets under os.umask(0o177) and explicitly apply os.chmod(..., 0o600) so sockets are never world- or group-accessible even briefly during creation.
  • Peer UID verification: On Linux, the CLI background service checks SO_PEERCRED on accepted connections and drops any client whose UID does not match os.getuid() without responding.
  • Locking and per-agent separation: Cross-process input serialization (core/computer_use_linux/lease.py) and single-instance daemon locks use 0o600 lock files (flock), and --agent NAME / CUL_AGENT isolates per-agent CLI service and cursor daemons under distinct socket names.
  • Loopback TCP fallback (cursor daemon): When a platform uses the cursor daemon's TCP mode (127.0.0.1), clients must authenticate with a 128-bit random token stored in a 0o600 endpoint file.

Reporting a Vulnerability

Please do not report security vulnerabilities through public GitHub issues, pull requests, or discussions.

  1. Open a private security report via GitHub Security Advisories: https://github.com/m3lonxd/computer-use-linux/security/advisories/new (Repository Security tab -> Advisories -> Report a vulnerability).
  2. Include as much detail as possible:
    • Affected module or adapter (core/, adapters/cli, adapters/http, adapters/mcp, deploy/).
    • Operating system, display server/compositor (e.g., KDE Wayland, GNOME, Sway, Hyprland, X11, Windows, macOS), and Python version.
    • Reproduction steps, configuration flags/environment variables (CUL_*), and expected vs. observed impact.

Reports are triaged privately, and fixes are coordinated before public disclosure.

There aren't any published security advisories