PYSEC-2026-2273: Ray < 2.56.0 Unsafe Deserialization RCE via WebDataset Reader

Published Jul 1, 2026
·
Updated

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 readwebdataset() function. The defaultdecoder() function in webdatasetdatasource.py unconditionally calls pickle.loads() on tar entries with .pkl/.pickle extensions and torch.load() with weightsonly=False on .pt/.pth entries, executing arbitrary code inside Ray remote workers on every worker that processes the malicious archive.

Affected Software

1 affected component
Anyscale Ray<2.56.0

Event History

Jul 1, 2026
CVE Published
via OSV·04:36 PM
Data Sourced
via OSV·04:36 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Who is exposed to this issue?

Ray deployments are exposed when they use read_webdataset() to process tar archives that an attacker can supply or modify. Code execution occurs in each Ray remote worker that processes the malicious archive.

2

What must an attacker provide to trigger execution?

The attacker needs a malicious tar archive that is passed to read_webdataset(). Entries ending in .pkl or .pickle are deserialized with pickle.loads(), while .pt and .pth entries are loaded with torch.load() with weights_only=False.

3

Is a non-default decoder configuration required for exploitation?

No. The affected _default_decoder() unconditionally uses the unsafe loading behavior for the listed file extensions, so archives handled by the default decoder are affected.

4

What should be done if patching cannot happen immediately?

Do not process untrusted or attacker-modifiable WebDataset tar archives with read_webdataset(). Restrict accepted archive contents so they cannot include .pkl, .pickle, .pt, or .pth entries.

5

Which Ray release addresses the issue?

Upgrade to Ray 2.56.0 or later. The affected versions are Ray releases prior to 2.56.0.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203