AI agents · OpenClaw · self-hosting · automation

Quick Answer

How to Secure ML Compute Clusters in 2026 (Full Guide)

Published:

Why This Guide Exists

Machine learning infrastructure grew up outside security review. Clusters get stood up by research teams optimising for iteration speed, using defaults that assume a trusted network, and then quietly become production systems that nobody re-evaluated.

August 17, 2026 made the cost of that concrete: CISA added CVE-2025-62593, a code injection flaw in Ray, to its Known Exploited Vulnerabilities catalog with a three-day federal remediation deadline — a compressed window reserved for confirmed active exploitation.

This guide is the checklist to work through afterwards. It is ordered by value-per-hour, not by ideology.

Step 1: Build an Honest Inventory (Do This First)

You cannot secure clusters you do not know exist. ML infrastructure is unusually prone to shadow deployments because frameworks start services as a side effect of ordinary use.

What to look for:

  • Ray head nodes and dashboards (commonly ports 8265, 6379, 10001)
  • Jupyter and JupyterLab servers, including on laptops
  • MLflow, Weights & Biases self-hosted, Kubeflow, Airflow
  • Model servers: Ray Serve, vLLM, Triton, TorchServe
  • Vector databases holding embeddings of proprietary data

How to find them: scan workstation subnets as well as cluster subnets, query your cloud provider for instances with GPU instance types, and grep your infrastructure-as-code repos for the relevant Helm charts and operators.

Completion criterion: you have a list, each entry has a named owner, and each entry is tagged production or experiment.

Step 2: Authenticate Every Control-Plane Endpoint

The single highest-value change. Every endpoint that can submit work, read data or return logs needs authentication — including the ones “only reachable internally.”

For Ray specifically: enable token authentication. KubeRay v1.5.1 and later supports configuring it directly; earlier versions can enable it by creating a Kubernetes Secret and setting the RAY_AUTH_MODE and RAY_AUTH_TOKEN environment variables. Ray’s own documentation is unambiguous that a dashboard behind a reverse proxy must have authentication or ingress controls supplied externally — the dashboard does not provide them for you by default.

For everything else: put an authenticating proxy in front of it, wired to your identity provider. Notebook servers with token-in-URL access are effectively public to anyone who can read a browser history or a shell log.

Completion criterion: an unauthenticated request to every endpoint on your Step 1 inventory returns 401 or 403.

Step 3: Defeat DNS Rebinding, Not Just This Bug

The Ray incident used DNS rebinding — an attack where a developer’s browser becomes the delivery vehicle for requests to internal services the attacker cannot reach directly. Patching one CVE does not close the class.

Two controls close it:

  1. Host header validation at the reverse proxy: reject any request whose Host header is not on an explicit allowlist. Rebinding depends on the browser sending an attacker-controlled hostname.
  2. Bind services to loopback and reach them through SSH port forwarding or an authenticated tunnel, rather than binding to 0.0.0.0 on a routable interface.

Completion criterion: a request with a forged Host header is rejected before reaching the application, and netstat on cluster nodes shows control-plane services bound to loopback.

Step 4: Cut the Blast Radius of the Head Node

Assume compromise and reduce what it yields.

  • Scope the instance role tightly. A training node needs read access to one data bucket and write access to one artifact bucket. It very rarely needs permission to launch instances, and almost never needs organisation-wide read.
  • Use short-lived credentials. Workload identity federation over long-lived keys, everywhere it is available.
  • Never mount long-lived cloud keys into worker containers. They end up in logs, in pickled objects and in shared notebooks.
  • Egress filtering. Training workers usually need package registries and object storage, nothing else. Default-deny outbound egress stops both exfiltration and cryptomining payload retrieval, and it is far easier to implement on a cluster than on a general network.

Completion criterion: you can state, from policy rather than memory, exactly what a compromised worker can reach.

Step 5: Segment Research From Production

The most common lateral-movement path in ML estates is a researcher’s experimental cluster sharing a subnet, an IAM role or a Kubernetes namespace with a serving cluster.

  • Separate accounts or projects for experimentation and serving.
  • Separate namespaces with NetworkPolicies that default to deny between them.
  • No shared service accounts across the boundary.
  • Different data classifications get different clusters — do not let a fine-tuning experiment on customer data run beside a public demo.

Completion criterion: a pod in the experiment namespace cannot open a connection to anything in the serving namespace.

Step 6: Secure the Supply Chain Into the Cluster

The code running on your GPUs arrives from somewhere. Three routes matter:

  • Container images. Pin digests, scan on build, rebuild on base-image CVEs. ML images are enormous and age badly.
  • Model weights. Prefer safetensors over pickle formats. Loading an untrusted pickle is arbitrary code execution by design, not by bug.
  • Datasets. Verify checksums, and treat any dataset pulled from a public hub as untrusted input to a system with credentials.

Completion criterion: no unpinned image tags in production manifests, and no pickle-format weights loaded from external sources.

Step 7: Detection That Actually Fires

Prevention fails eventually. These four signals catch most real ML-cluster compromise, and all four are cheap:

  1. Unexpected job submissions — jobs from unknown identities or outside working hours.
  2. New outbound destinations from worker nodes, especially to hosting providers and mining pools.
  3. Cloud billing anomalies — a sudden GPU instance spike is the loudest possible signal and the one teams most consistently discover a week late. Alert on daily spend delta.
  4. Credential use from unexpected regions or services, which catches exfiltrated instance-role keys.

Completion criterion: each of these four has an alert with a named owner and a tested notification path.

Step 8: Bring ML Into Normal Vulnerability Management

Close the loop that created the problem:

  • ML platform components go into the same asset inventory as everything else.
  • Patch SLAs apply, with KEV-listed vulnerabilities treated as emergency change.
  • Someone subscribes to security advisories for Ray, Kubeflow, MLflow, vLLM and your serving stack.
  • New clusters are provisioned from a hardened, authenticated template — not from a tutorial.

The Fastest Path If You Only Have One Day

In priority order: patch Ray, enable token authentication everywhere, take control-plane endpoints off routable interfaces, scope the head-node IAM role down, and turn on a billing anomaly alert. That sequence removes most of the realistic attack paths in under a day, and the remaining steps can follow on a normal change cadence.

Sources