CVE-2025-34351: Ray's New Token Authentication is Disabled By Default
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_MODEThe 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
httpand does not expire. Add TLS, an SSH tunnel or a VPN, and avoid exposing the dashboard to the internet.
References
Read for this analysis:
- https://docs.ray.io/en/latest/ray-security/token-auth.html
- https://github.com/advisories/GHSA-gx77-xgc2-4888
- https://github.com/JLLeitschuh/security-research/security/advisories/GHSA-w8vc-465m-jjw6
- https://nvd.nist.gov/vuln/detail/CVE-2025-34351
- https://www.vulncheck.com/advisories/anyscale-ray-token-authentication-disabled-by-default-insecure-configuration
- https://github.com/ray-project/ray/releases/tag/ray-2.52.0
- https://www.cve.org/resourcessupport/allresources/cnarules#section_4-1_Vulnerability_Determination
- https://www.linkedin.com/posts/jonathan-leitschuh_the-latest-piece-of-mind-bending-research-activity-7396976425997606912-qizE
- https://www.oligo.security/blog/shadowray-2-0-attackers-turn-ai-against-itself-in-global-campaign-that-hijacks-ai-into-self-propagating-botnet
- https://www.oligo.security/blog/shadowray-attack-ai-workloads-actively-exploited-in-the-wild
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 entriesCVE-2026-57516
Ray: Arbitrary code execution via ray.data.read_webdataset default decoder: pickle.loads(value) and torch.load(weights_only=False)
high8.8Jul 24, 2026CVE-2026-41486
Ray: Remote Code Execution via Parquet Arrow Extension Type Deserialization
high8.9Apr 24, 2026CVE-2026-32981
Ray Dashboard is vulnerable to path traversal through its static file handling mechanism
high7.5Mar 17, 2026CVE-2026-27482
Ray dashboard DELETE endpoints allow unauthenticated browser-triggered DoS (Serve shutdown / job deletion)
medium5.9Feb 20, 2026CVE-2025-62593
Ray is vulnerable to Critical RCE via Safari & Firefox Browsers through DNS Rebinding Attack
critical9.4ExploitedNov 26, 2025CVE-2025-1979
ray vulnerable to Insertion of Sensitive Information into Log File
medium6.4Mar 6, 2025
