CVE-2026-57516: Ray Package Unsafe Deserialization Vulnerability Leading to Remote Code Execution

ray Updated 18 Jul 2026

Summary

01/07/2026
Yes i
High
8.8

CVE-2026-57516: 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. Affects ray versions < 2.56.0. Fixed in 2.56.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Ray is an open-source framework designed for building and running distributed applications. It provides a simple interface for parallel and distributed computing, enabling developers to scale their applications seamlessly. However, Ray versions prior to 2.56.0 are vulnerable to an unsafe deserialization issue within the WebDataset reader, which can be exploited by attackers.

Vulnerability Detail

The vulnerability arises from the WebDataset reader in Ray, where 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. This behavior allows attackers to craft a malicious tar archive that, when processed by the read_webdataset() function, can execute arbitrary code within Ray remote workers. The implications of this vulnerability are severe, as it can lead to remote code execution, potentially compromising the entire system running the affected Ray instance.

How To Fix

Latest published version: 2.59.0 as of 23 Oct 2026

pip install --upgrade "ray==2.59.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.56.0

This is the first release that contains the fix.

pip install --upgrade "ray==2.56.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid using the WebDataset reader with untrusted tar archives. Ensure that any tar files processed by the read_webdataset() function are from trusted sources to mitigate the risk of exploitation until the package is updated.

Conclusion

The CVE-2026-57516 vulnerability in the Ray package poses a significant risk due to unsafe deserialization that can lead to remote code execution. Users are strongly advised to update to version 2.56.0 or later to mitigate this risk. Additionally, employing temporary workarounds and utilizing tools like Vulert can help in monitoring and managing vulnerabilities effectively.

See every vulnerability recorded for ray →

Share this vulnerability

FAQ

CVE-2026-57516 is a vulnerability in the Ray package that allows for remote code execution due to unsafe deserialization in the WebDataset reader.

Ray versions prior to 2.56.0 are affected by this vulnerability.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Check your application's vulnerability status using the Vulert playground at Vulert Scanner.

If you cannot update Ray immediately, avoid using the WebDataset reader with untrusted tar archives as a temporary workaround.

Failing to address this vulnerability can lead to remote code execution, allowing attackers to execute arbitrary code on your system, which may result in data breaches or system compromise.

Related vulnerabilities

Recent vulnerabilities recorded for ray.

How To Fix

Latest published version: 2.59.0 as of 23 Oct 2026

pip install --upgrade "ray==2.59.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.56.0

This is the first release that contains the fix.

pip install --upgrade "ray==2.56.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback