Description
Ray prior to 2.56.0 contains an unsafe deserialization vulnerability in the WebDataset reader that allows attackers to achieve remote code execution by supplying a malicious tar archive to the read_webdataset() function. The _default_decoder() function in webdataset_datasource.py unconditionally calls pickle.loads() on tar entries with .pkl/.pickle extensions and torch.load() with weights_only=False on .pt/.pth entries, executing arbitrary code inside Ray remote workers on every worker that processes the malicious archive.
Published: 2026-07-01
Score: 8.6 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Ray’s WebDataset reader processes tar archives that may contain .pkl, .pickle, .pt, and .pth files. This is a CWE‑502 unsafe deserialization vulnerability. In versions prior to 2.56.0 the reader unconditionally deserializes these files using pickle.loads() or torch.load() without checking for malicious content. An attacker can embed arbitrary bytecode in such files so that when read_webdataset() is called a malicious archive is processed, leading to code execution under the privileges of any Ray worker that handles the archive. This grants an attacker full remote code execution on every worker that ingest the malicious archive, potentially compromising an entire Ray cluster.

Affected Systems

All installations of Ray from Anyscale, Inc. with a version earlier than 2.56.0 are vulnerable. The issue primarily affects components that ingest WebDataset archives, including worker processes that invoke read_webdataset() on external or user‑supplied tar files.

Risk and Exploitability

The CVSS score of 8.6 reflects a high severity because arbitrary code can run on any Ray worker that calls read_webdataset(). The EPSS score of less than 1% indicates a low probability of exploitation at present, although the flaw would be easy to exploit if a malicious tar archive is sent to a component that invokes read_webdataset(), potentially compromising a Ray cluster. The vulnerability is not listed in the CISA KEV catalog.

Generated by OpenCVE AI on July 31, 2026 at 15:29 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Ray to version 2.56.0 or later, which removes the unsafe deserialization.
  • Restrict the use of read_webdataset() to trusted, pre‑validated tar archives and disallow uploads that contain .pkl, .pickle, .pt, or .pth files.
  • Implement a custom decoder that only accepts safe file types or filters out deserialization of these extensions before processing.
  • Monitor Ray cluster logs for calls to pickle.loads() or torch.load() during dataset ingestion and investigate any anomalies.

Generated by OpenCVE AI on July 31, 2026 at 15:29 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-hhrp-gw25-jr43 Ray: Arbitrary code execution via ray.data.read_webdataset default decoder: pickle.loads(value) and torch.load(weights_only=False)
History

Tue, 14 Jul 2026 21:45:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:anyscale:ray:*:*:*:*:*:*:*:*

Wed, 01 Jul 2026 23:15:00 +0000

Type Values Removed Values Added
First Time appeared Anyscale
Anyscale ray
Vendors & Products Anyscale
Anyscale ray

Wed, 01 Jul 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 01 Jul 2026 17:15:00 +0000

Type Values Removed Values Added
Description Ray prior to 2.56.0 contains an unsafe deserialization vulnerability in the WebDataset reader that allows attackers to achieve remote code execution by supplying a malicious tar archive to the read_webdataset() function. The _default_decoder() function in webdataset_datasource.py unconditionally calls pickle.loads() on tar entries with .pkl/.pickle extensions and torch.load() with weights_only=False on .pt/.pth entries, executing arbitrary code inside Ray remote workers on every worker that processes the malicious archive.
Title Ray < 2.56.0 Unsafe Deserialization RCE via WebDataset Reader
Weaknesses CWE-502
References
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 8.6, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-07-14T21:34:31.049Z

Reserved: 2026-06-24T15:58:58.537Z

Link: CVE-2026-57516

cve-icon Vulnrichment

Updated: 2026-07-01T17:52:54.836Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-31T15:30:03Z

Weaknesses
  • CWE-502

    Deserialization of Untrusted Data