CVE-2025-34351: Ray Ray's New Token Authentication Is Vulnerability
CRITICALCVE-2025-34351 is a CRITICAL ray's new token authentication is vulnerability (CWE-1188: Initialization of a Resource with an Insecure Default) affecting Ray libraries in the PyPI ecosystem. The issue involves ray's new token authentication is disabled by default. Remediation is available in the latest vendor maintenance releases.
CVE-2025-34351 at a Glance
How to Fix CVE-2025-34351
To remediate this vulnerability, upgrade all affected Ray dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install ray>=Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show ray
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-34351, inspect your installed packages using pip:
pip show ray
Analyze the terminal output to locate any version of Ray in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The pip show ray command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1188: Initialization of a Resource with an Insecure Default, where the product initializes or sets a resource with a default that is intended to be changed by the product's installer, administrator, or maintainer, but the default is not secure. In Ray, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-34351 Affected Ray Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ray
|
PyPI |
≤ 2.52.0
|
|
References
Frequently Asked Questions
What is CVE-2025-34351?
Which Ray versions are affected?
What version fixes CVE-2025-34351?
Is ray affected?
What CWE is associated with CVE-2025-34351?
How can I check PyPI dependencies for CVE-2025-34351?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-gx77-xgc2-4888",
"modified" : "2025-12-01T20:51:10Z",
"published" : "2025-11-27T03:30:26Z",
"aliases" : [ "CVE-2025-34351" ],
"summary" : "Ray's New Token Authentication is Disabled By Default",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "ray"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "2.52.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/JLLeitschuh/security-research/security/advisories/GHSA-w8vc-465m-jjw6"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-34351"
}, {
"type" : "WEB",
"url" : "https://docs.ray.io/en/latest/ray-security/token-auth.html"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ray-project/ray"
}, {
"type" : "WEB",
"url" : "https://github.com/ray-project/ray/releases/tag/ray-2.52.0"
}, {
"type" : "WEB",
"url" : "https://www.cve.org/resourcessupport/allresources/cnarules#section_4-1_Vulnerability_Determination"
}, {
"type" : "WEB",
"url" : "https://www.linkedin.com/posts/jonathan-leitschuh_the-latest-piece-of-mind-bending-research-activity-7396976425997606912-qizE"
}, {
"type" : "WEB",
"url" : "https://www.oligo.security/blog/shadowray-2-0-attackers-turn-ai-against-itself-in-global-campaign-that-hijacks-ai-into-self-propagating-botnet"
}, {
"type" : "WEB",
"url" : "https://www.oligo.security/blog/shadowray-attack-ai-workloads-actively-exploited-in-the-wild"
}, {
"type" : "WEB",
"url" : "https://www.vulncheck.com/advisories/anyscale-ray-token-authentication-disabled-by-default-insecure-configuration"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1188", "CWE-304" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2025-12-01T20:51:10Z",
"nvd_published_at" : "2025-11-27T03:15:58Z"
}
}