NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Ray

CVE-2025-34351: Ray's New Token Authentication is Disabled By Default

criticalCVSS 4.0 9.3GHSA-gx77-xgc2-4888

Anyscale Ray 2.52.0 ships with token authentication for its dashboard and Jobs API turned off unless `RAY_AUTH_MODE=token` is set. On a default cluster, anyone who can reach those interfaces can submit jobs and run code on it. No patched version is listed. The fix is to enable token authentication and keep the ports private.

Published Nov 27, 2025 · Updated Dec 1, 2025 · Analysis Nov 1, 2026

What an attacker can do

Ray 2.52.0 added token authentication for management interfaces, but it is opt-in. Without RAY_AUTH_MODE=token, the dashboard and the Jobs API accept requests from anyone. Submitting a job means running arbitrary Python on the cluster, so an unauthenticated network client gets code execution on the head node and workers. No exploit trick is needed, which explains the CVSS 4.0 score of 9.3.

The attacker needs network access to the dashboard port or Jobs API. That is common on AI training and inference clusters bound to all interfaces, or reachable through a broad cloud security group or a flat internal network. They get the cluster's compute, any data and credentials the jobs can read (model weights, datasets, cloud keys in the environment), and a foothold for lateral movement. This is a configuration weakness: the vendor says it plans to enable token authentication by default in a future release.

The Ray documentation now says local clusters have authentication on by default from 2.59 and all clusters from 2.61. That is later than the 2.52.0 this entry names.

Who is affected

Ray (pip package ray) 2.52.0 and earlier, for any cluster started without RAY_AUTH_MODE=token. The 2.52.0 release is the first to offer token authentication, so earlier versions have no built-in option at all. Check the version, and check whether the environment of the head node has the setting:

pip show ray
ray --version
echo $RAY_AUTH_MODE

The vulnerable state is an empty or disabled value, with the dashboard or Jobs API (typically port 8265) reachable from untrusted networks.

ray

Ecosystem
PyPI
Affected
<= 2.52.0
Fixed in
No patched version yet
Check
pip show ray

How to fix it

The entry lists no patched version, so the fix is configuration. Per the Ray docs, set RAY_AUTH_MODE=token before starting the cluster, and on every node and client shell. Generate a token with ray get-auth-token --generate, and copy the same token to each node's ~/.ray/auth_token, or point RAY_AUTH_TOKEN_PATH at a token file. The docs prefer a file over RAY_AUTH_TOKEN, so other code does not read the token from the environment.

The token is sent as a plaintext header over plain http, so also use TLS, an SSH tunnel or a VPN, and keep the dashboard off public networks. Later Ray releases (2.59 for local clusters, 2.61 for all clusters, per the docs) turn authentication on by default.

How to tell if you were hit

From outside the cluster network, test whether the dashboard and Jobs API answer without a token on port 8265, for example by requesting the /api/jobs/ path. Open means exposed. On the head node, ray start --head logs a warning when it starts an unauthenticated cluster. Review the Ray job list (ray job list) for jobs you did not submit, entrypoints that download and run code, unexpected processes on workers such as miners or reverse shells, and unusual outbound connections from cluster nodes.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Anyscale Ray 2.52.0 contains an insecure default configuration in which token-based authentication for Ray management interfaces (including the dashboard and Jobs API) is disabled unless explicitly enabled by setting RAY_AUTH_MODE=token. In the default unauthenticated state, a remote attacker with network access to these interfaces can submit jobs and execute arbitrary code on the Ray cluster. NOTE: The vendor plans to enable token authentication by default in a future release. They recommend enabling token authentication to protect your cluster from unauthorized access.

Questions

Is there a patched Ray version for CVE-2025-34351?

The entry lists none. Enable authentication yourself with RAY_AUTH_MODE=token. The Ray docs state that authentication is on by default for local clusters from 2.59 and for all clusters from 2.61.

Is CVE-2025-34351 exploited in the wild?

It is not in CISA's KEV catalog. The references include Oligo write-ups on the ShadowRay campaigns against exposed Ray clusters, but this entry's sources do not confirm exploitation of this specific CVE.

Does enabling the token make a public dashboard safe?

Not alone. The Ray docs say the token travels as a plaintext HTTP header over http and does not expire. Add TLS, an SSH tunnel or a VPN, and avoid exposing the dashboard to the internet.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Ray vulnerabilities

All Ray entries