Skip to main content

CVE-2023-48022 (ShadowRay): The Disputed Ray Jobs API Flaw, From First Exploitation to Token Authentication


For executives​

CVE-2023-48022 is the missing authentication on Ray's Jobs API: anyone who can reach a Ray cluster's dashboard can submit a job, and a job is a shell command that runs on the cluster. It is rated 9.8 (Critical) by NVD. Ray's maintainers dispute it as intended behavior for a trusted network, so there has never been a patch, and many vulnerability scanners do not flag disputed CVEs. Attackers have used it since at least September 2023 to mine cryptocurrency on GPU clusters, steal cloud credentials and models, and, in the ShadowRay 2.0 campaign, turn compromised clusters into a self-spreading botnet. Ray 2.52.0 finally added token authentication, but it is off unless you turn it on.

What the flaw is​

A Ray cluster's head node runs a dashboard, on port 8265 by default, with a REST Jobs API. A client sends a POST request to /api/jobs/ with a JSON body whose entrypoint field is a shell command; Ray runs that command on the cluster to start the job. There is no authentication in front of it. Ray's threat model assumes only trusted users can reach the dashboard. In practice clusters end up bound to 0.0.0.0, behind misconfigured ingress, or on cloud machines with open security groups, and at that point "reachable" means "authorized".

Because running submitted code is what the API is for, nothing about an attacker's job looks like an exploit. It is queued and scheduled like any engineer's job, inherits the worker's identity, cloud credentials and GPU entitlement, and can use Ray's own scheduler to run on every node.

Disclosure and dispute​

Bishop Fox reported the issue to Anyscale, Ray's maintainer, in 2023, and five Ray vulnerabilities were disclosed to Anyscale in late 2023 by Bishop Fox, Sierra Haex and Protect AI. Four (CVE-2023-6019, CVE-2023-6020, CVE-2023-6021 and CVE-2023-48023) were fixed in Ray 2.8.1. Anyscale declined to fix CVE-2023-48022, calling the lack of built-in authentication "a long-standing design decision" (The Register). NVD lists the CVE as disputed.

A disputed CVE is easy to miss: scanners and software composition tools that suppress disputed entries report a Ray deployment as clean. Oligo Security called it a "shadow vulnerability" for that reason.

Exploitation timeline​

  • September 2023: earliest evidence of compromise Oligo found, before the CVE was published.
  • November 28, 2023: CVE-2023-48022 published in NVD, disputed.
  • March 26, 2024: Oligo publishes ShadowRay, reporting thousands of compromised Ray servers across sectors including education, cryptocurrency, biopharma and video analytics, with cryptominers, reverse shells and stolen credentials (Oligo Security).
  • November 18, 2025: Oligo publishes ShadowRay 2.0: more than 230,000 Ray servers exposed, and an actor it tracks as IronErn440 running a self-propagating botnet for GPU mining, credential and model theft and DDoS, updated from throwaway GitLab and GitHub repositories. In one case Oligo described, the victim's Ray dashboard showed 0 percent GPU utilization while the attack used GPU memory on A100s (Oligo Security).
  • November 2025: Ray 2.52.0 adds opt-in token authentication. The insecure default is assigned CVE-2025-34351.
  • 2026: Stealthium reproduces the ShadowRay 2.0 chain end to end against a Ray cluster with an NVIDIA L40S, and a Shodan search at publication returns more than 175,000 internet-exposed Ray servers.
  • October to November 2026: Elastic Security Labs documents an intrusion (REF3364) through an unauthenticated Ray job agent on a cluster whose dashboard was bound to loopback, ending in miners on three GPU hosts hidden behind a fake NVML library (Elastic Security Labs).

Exposure counts differ by date and search method; all of them are in the hundreds of thousands, not the thousands.

What an attack looks like​

Based on Oligo's reporting and Stealthium's reproduction, a ShadowRay 2.0 compromise runs in three phases:

  1. Reconnaissance: a job whose entrypoint runs uname and id, enumerates GPUs with ray.cluster_resources() and calls back to an out-of-band collector, confirming the target is live and worth using.
  2. Execution and impact: a job that downloads and runs a script, starts a miner such as XMRig or Rigel against a public pool, and reads AWS and service-account credentials from the worker's environment, alongside any model weights and datasets the pod can reach.
  3. Persistence, stealth and spread: a cron entry that re-fetches the controller script every 15 minutes, process names rewritten to look like kernel threads (kworker/0:0), hidden binaries and innocuous systemd unit names, CPU mining capped near 60 percent, and resubmission across every node with Ray's own scheduling, after which the cluster scans for the next victim.

None of these steps needs an exploit, a privilege escalation or a malware signature.

Status and fix​

There is no patch for CVE-2023-48022 itself, because Ray's maintainers do not consider it a bug. The control is authentication:

  • Run Ray 2.52.0 or later and set RAY_AUTH_MODE=token on every node. Any other value, including a typo, leaves authentication off.
  • Keep the dashboard, job agents and GCS ports on private networks. Restricting the dashboard alone is not enough: in REF3364 the job agent was the way in.
  • Find every Ray deployment, including notebooks, Helm charts and images that start Ray with --dashboard-host=0.0.0.0, and treat disputed CVEs as in scope for scanning.

Detection​

Each step of a ShadowRay attack resembles a normal Ray job in isolation. The signals are in combining them:

  • API layer: job submissions with no Authorization header from unexpected sources, and entrypoints that pipe a download into a shell or name a miner or mining pool.
  • Process layer: Ray workers importing subprocess, pty, socket and ctypes and spawning shells; env and grep reading AWS_* variables; a process named like a kernel thread that executed a user-space binary.
  • Network layer: DNS lookups and stratum connections to mining pools; callbacks to out-of-band testing domains.
  • GPU layer: a CUDA kernel relaunched in a tight loop at a wide grid, the proof-of-work signature, and GPU use that the Ray dashboard does not report.

Tied to one workload and one unauthenticated request, those four layers describe the attack with high confidence. In Stealthium's reproduction, they produced one correlated alert for the exploitation chain and an independent alert from the GPU signature alone, on the same process.

Sources: NVD, CVE-2023-48022; Oligo Security, ShadowRay and ShadowRay 2.0; The Register; Anyscale, token authentication; Elastic Security Labs, SANSAR