chore(deps): Update dependency ray to >=2.56.0 [SECURITY] - #1085
Open
renovate[bot] wants to merge 1 commit into
Open
chore(deps): Update dependency ray to >=2.56.0 [SECURITY]#1085renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/pypi-ray-vulnerability
branch
from
July 25, 2026 03:13
f5fbd7f to
16af736
Compare
renovate
Bot
force-pushed
the
renovate/pypi-ray-vulnerability
branch
from
July 25, 2026 05:55
16af736 to
35483bd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
>=2.55.1→>=2.56.0Ray: Arbitrary code execution via ray.data.read_webdataset default decoder: pickle.loads(value) and torch.load(weights_only=False)
CVE-2026-57516 / GHSA-hhrp-gw25-jr43 / PYSEC-2026-2273
More information
Details
Summary
ray.data.read_webdataset(paths=...)is a@PublicAPI(stability="alpha")reader for WebDataset-format TAR files. Its default
decoder=Trueinvokes_default_decoderon every sample's keys, which routes file extension to adecoder by extension. Two of those branches deserialize attacker-controlled
bytes with no validation:
.pickle/.pkl->pickle.loads(value).pt/.pth->torch.load(io.BytesIO(value), weights_only=False)Both fire during a standard
ray.data.read_webdataset(...).take_all()/.iter_batches()call. No flags, no opt-in, no environment variable.An attacker who can supply a TAR (via S3 share, HuggingFace Hub mirror,
email attachment, model-zoo, or any HTTP URL the user passes to
read_webdataset) achieves arbitrary code execution in the callingRay process at schema-sample time, before row data is consumed.
This is the same class of bug as GHSA-mw35-8rx3-xf9r (Parquet Arrow
Extension Type cloudpickle deserialization, patched in 2.55.0): standard
data-loading API, attacker-controlled file format, deserialization gadget
invoked transparently. The 2.55.0 patch addressed
tensor_extensions/arrow.py:_deserialize_with_fallbackand made cloudpickleopt-in via
RAY_DATA_AUTOLOAD_CLOUDPICKLE_TENSOR_METADATA=1. TheWebDataset path is a different code site and was not touched.
Vulnerable code (HEAD
a157d4d)python/ray/data/_internal/datasource/webdataset_datasource.pylines175-225, the
_default_decoderfunction:The comment for the
.pt/.pthbranch is itself a security smell: itdocuments that the maintainer chose
weights_only=Falseto overridePyTorch 2.6's safer default. The comment treats this as a compatibility
fix; it functionally re-enables an arbitrary-code-execution path that
upstream PyTorch closed.
Reachability and default-on confirmation
python/ray/data/read_api.py:2289definesread_webdatasetwith defaultdecoder=True:WebDatasetDatasource._read_stream(line 367) calls the decoderunconditionally when not None:
True is not Noneevaluates True, so the default decoder fires for everyinvocation that doesn't explicitly pass
decoder=None(or a custom safedecoder). The documentation does not warn about the behavior.
End-to-end reproduction
Tested on a fresh venv (
pip install ray[data]) on Linux x86_64. Rayreports
__version__ == "2.55.1"(the patched-against-GHSA-mw35 release):Output:
The
.pt/.pthvariant is the exact same primitive against thetorch.load(io.BytesIO(value), weights_only=False)branch; replace theTAR member with
000000.ptcontainingtorch.save(Gadget())to reproduce.Real-world delivery vectors
paths=["s3://bucket/poisoned.tar"]-- the user thinks they are readinga WebDataset shard; the bucket is shared, mis-permissioned, or
compromised.
paths=["https://attacker/model.tar"]-- HTTP-served WebDataset.pull TAR shards via
datasetsand feed them to Ray Data.Why GHSA-mw35 doesn't cover this
GHSA-mw35-8rx3-xf9r patched
tensor_extensions/arrow.py:_deserialize_with_fallbackby gating
cloudpickle.loadsbehindRAY_DATA_AUTOLOAD_CLOUDPICKLE_TENSOR_METADATA=1. That change touchesthe Parquet ExtensionType deserialization path only. The advisory text
does not mention WebDataset, the WebDataset code is in a different
module, and the unsafe loads here use
pickle.loadsandtorch.load(weights_only=False)(notcloudpickle.loads).Suggested patch
Two minimal options, both Ray-internal:
Make the unsafe extensions opt-in, mirroring the GHSA-mw35 fix
pattern. Replace the
.pt/.pthand.pkl/.picklebranches with aguard:
Drop these branches from the default decoder entirely and require
callers to provide their own decoder when working with .pkl/.pt
samples. This is the safer default, matches WebDataset upstream's
guidance ("by default, use safe decoders"), and is consistent with
the spirit of the GHSA-mw35 patch.
Either option flips the default-on RCE primitive into an explicit
opt-in. The current default-on behavior provides no signal to users
that calling
ray.data.read_webdataseton an untrusted TAR isequivalent to running attacker code.
References
python/ray/data/_internal/datasource/webdataset_datasource.py:175-225python/ray/data/read_api.py:2287-2370(read_webdataset)Arrow Extension Type, patched 2.55.0)
cloudpickle but did not touch the WebDataset decoder.
Severity
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
CVE-2026-57516 / GHSA-hhrp-gw25-jr43 / PYSEC-2026-2273
More information
Details
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.
Severity
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:XReferences
This data is provided by OSV and the PyPI Advisory Database (CC-BY 4.0).
Release Notes
ray-project/ray (ray)
v2.56.0Compare Source
Highlights
iter_batchesstability by reducing hidden buffering and shutting down the executor when consumers exit early (#63660, #63682, #62949). This reduces object-store spilling for common training workloadsConsistentHashRouter(#62905, #63096, #62906) andCapacityQueueRouter(#62323) which is beneficial for supply-constrained workloads.ray.io/gpu-domainlabel instead of only packing at the single-node level. We've also added initial Kubernetes in-place pod resizing support for Autoscaler v2 (#55961, #62369, #62215), enabling Ray clusters to resize CPU and memory on existing worker pods before scaling out new pods.Ray Data
🎉 New Features
Dataset.mix()public API andMixOperatorfor weighted dataset mixing (#63168, #62450)ParquetDatasourceV2, chunked reader, predicate splitting, listing/scanner infra (#63113, #63454, #63163, #62975, #63027, #62182)batch_size='auto'tomap_batchesto derive batch row count from target row batch size (#62648)include_row_hashtoread_parquet(#61408)isolate_read_workers(#63490)default_map_logical_memory_enabled(#63814)start_offsetandend_offsetforread_kafka(#61620)💫 Enhancements
iter_batchesspilling by replacingmake_async_genwithiter_threadedand reducing buffered batches (#63660, #63682)restore_original_orderiniter_batchesbehindpreserve_order(#63792)drop_columnsto aProjectlogical operator when input schema is known (#63813)ConcatAggregationandTurbopufferDatasinkusepolarsfor sorting (#61904)hash_partitionwithsort_indices, zero-copy slices, and pandas (#63498, #62757, #63152, #62587)GPU_SHUFFLEingrouped_data.py(#62410)StarExprexpansion, schema inference for non-black-box UDFs, and Expressions struct support (#63776, #63387, #62560)RAY_DATA_LOG_LEVELand logRAY_DATAenv vars at execution start (#63487, #63380)compute=infilter(expr=...)and deprecateconcurrency=(#63576)StreamingRepartitionand read stage column-rename removal (#62347, #63384, #63582)BlockMetadataWithSchema(#63462)TaskDurationStatsand Timer withDistributionTracker(#63488, #63530, #63825)BlockEntryonRefBundlein place of(ref, metadata)tuples (#63654)DataIteratorexit (#62456, #62949)pandas,modin, andpyarrowminimum versions (#62899)ActorPool(#61987, #61528)ConcurrencyCapBackpressurePolicy,DataIterator.to_torch, and pandas UDF batches (#63392, #62540, #61733).options(#62309, #62722)read_deltareads from preconfiguredpyarrowdataset (#61721)ArrowConversionError; reduce arrow conversion warning verbosity (#62407, #61486, #62521)DataSourceV2by default after earlier enabling (#63674, #63326)🔨 Fixes
__subcluster__toray-subcluster(#63982)get_or_create_stats_actorcrash in Ray Client mode (#63402)UDFExprfilter predicates (#63781)CheckpointConfigFileNotFoundErroron Azure Blob Storage (#63606)_concatenate_extension_column(#62939)HashAggregateduplicate group rows forAggregateFnV2(#63066)read_parquetArrowNotImplementedErrorfor nested column types exceeding ~2GB row group (#61824)read_parquetnested-type fallback and parquet scanner memory accumulation (#63175, #62745)DataIterator.to_torch()by switching toPyArrow(#60966)ZipOperatorfreeing shared blocks via_split_at_indices(#62665)write_parquet(#62377)ShuffleStrategy.GPU_SHUFFLE(#62351)DatasetStatuuid propagation (#62255)DATA_ENABLE_OP_RESOURCE_RESERVATION=False(#61718)PyFileSystem(#61850)try_create_dirtopyarrow.dataset.write_dataset(#58302)nan_is_null/nans-as-nulls semantics in encoder (#62623, #62618)find_partition_index(#62594)_split_predicate_by_columnscorrectness fix (#63176)_is_cudf_dataframewhen cudf not loaded (#62302)tfx-bslsupport fromread_tfrecords(#63245)📖 Documentation
isolate_read_workersforread_parquet(#63816)build_processorand"auto"batch size (#61757, #62790)DefaultClusterAutoscalerV2and stale object-store-memory warnings (#62385, #62387)Ray Serve
🎉 New Features:
choose_replica/dispatchon deployment handles andAsyncioRouterwith replica-side slot reservation (#63255, #63254, #63252)ConsistentHashRouterfor session-sticky routing (#63238, #62906, #63096, #62905)CapacityQueueRouter(#62323)ray-haproxysupport behindRAY_SERVE_EXPERIMENTAL_PIP_HAPROXY(#62589)ControllerOptionsfor configurable controllerruntime_env(#63352)💫 Enhancements:
0.0.0.0for cross-node HAProxy routing (#62515)TCP_NODELAYdefault 1, optional retry knobs,RAY_SERVE_HAPROXY_STATS_PORT(#63356, #63531, #63353, #63415, #62979)RAY_SERVE_HAPROXY_BINARY_PATH; HAProxy abspath env var (#63829, #62610)/api/serve/applications/API; addmax_replicas_per_nodeto response (#63556, #63234)DeploymentStateManagerAPIs for controller access (#62950)DEPLOYMENT_TARGETSbroadcast while replicas are RECOVERING (#62751)LongPollHoststate on deployment delete; enable logs when client stops its event loop (#62820, #63028)serve_autoscaling_target_ongoing_requests(#62381, #62355, #62421)serve_long_poll_latency_ms(#62868)build_serve_applicationtask on failure (#62987)DeploymentMode(#63548, #63510)🔨 Fixes:
move_to_end()(#62548)AttributeErrorwhenrequest_routeris None inupdate_deployment_config(#63180)UnboundLocalErrorinActorReplicaWrapper.check_stopped()(#63339)_global_clientcache across driver sessions (#62368)start_metrics_pushercrash when deployment hasrecord_autoscaling_statsbut no autoscaling config (#62123)ingress_request_router.lua.tmplinpackage_data(#63145)root_pathparameter across uvicorn versions (#62529)📖 Documentation:
Ray Train
🎉 New Features
LoggingConfigfor configuring theray.trainlogger on controller and workers (#61550)DataParallelTrainer'strain_fnto return data (#62021)💫 Enhancements
ray.train.report(checkpoint)(#62027)create_or_update_train_runcompletes on Train initialization (#63432)DatasetManager(#63309)label_selectortoAutoscalingCoordinator(#63287)contextlib.redirect_stdout()to bypass print redirect to logs (#61075)ray.train.report(#62916)ray.train.reportdoes not hang across replica group restarts; Ray Train manages replica group restarts (#62651, #61475)RayTaskErrorduringBackendSetupCallbackshutdown (#63143)JaxTrainerTPU multi-slice fault tolerance and reservation ergonomics (#62893)PlacementGroupCleanerrace condition: drain queue before cleanup on controller death (#62754)delete_local_checkpoint_after_upload=True(#62555)timeout_storay.train.get_all_reported_checkpoints(#61761)pytorch_lightningimports (#61291)Predictorfrom Train v1 (#63461)🔨 Fixes
DataBatchTypeUnion type (#63872)exclude_resourcesregression for V1 Train + V2 cluster autoscaler (#62827)%stologger.debug(#63039)get_actortimeout (#62516)📖 Documentation
Result.from_pathin docs (#62887)Ray Tune
💫 Enhancements
AxSearchfor Ax Platform 1.0.0+ (#60522)inspectfor argument capture (#60049)🔨 Fixes
Ray LLM
🎉 New Features
topologyfield toLLMConfigfor multi-host TPU support (#61906)TPUAccelerator(#63177)RAY_SERVE_SESSION_ID_HEADER_KEY(#63362)💫 Enhancements
vLLMto 0.22.0 (#63730, #63396, #62970, #62349)AsyncioRouterfor LLM ingress (#63517)choose_replica; don't fetchLLMConfigfrom replicas at startup (#63280, #63065)max_tasks_in_flight_per_actorto a first-class config field and adjust defaults (#63214)accelerator_typeagainst CPU-only configs; replaceGPUTypealias withAcceleratorType(#62139, #62978)_internal(#62570)🔨 Fixes
guided_decoding,truncate_prompt_tokens,build_llm_processor(#63569)ImportErrorwhenvLLMis installed but fails to import (#63305)max_pending_requestsdefault to trackvLLM's GPU-dependentmax_num_seqs(#62918)rope_scaling(#62464)LLMRouterconstructor (#63206)contentin sanitizer (#63119)lora_requestnot forwarded tovLLMengine + add regression tests (#62609)SGLangEngineProcessortelemetry fortrust_remote_codemodels (#62102)TOKENIZER_ONLYdownloads missingchat_templatefor S3-backed models (#62121)add_generation_prompt(#61688)benchmark_vllmCLI builder (#63516)📖 Documentation
vLLMcompatibility (#63593)VLLM_USE_V1from docs and examples (#63001)max_tasks_in_flight_per_actor(#62917)Ray RLlib
🎉 New Features
custom_resources_per_learnerconfig andcustom_resources_for_main_processtoAlgorithmConfig(#63303, #62475)APPOmetrics to the torch learner (#63675)💫 Enhancements
IMPALA/APPOlearner thread gracefully to avoid misleading error messages (#62763)🔨 Fixes
PPO's value target calculation (#59958)EnvRunnercrash loops (#62884)ValueErrorinMultiAgentEpisode.get_rewards()when an agent is inactive for all requested env steps (#62907)_update_env_seed_if_necessary(#61823)EMAStat(#63064)📖 Documentation
Ray Core
🎉 New Features
register_collective_backendAPI for custom collective backends (#60701)noDriverTimeoutSecondsfor KubeRay cluster termination (#63465)ObjectRefs inray.get(#61773), retry support (#62842), and NIXL memory deregistration viaderegister_nixl_memory(#62341).tar.gzarchives for remoteworking_dirURIs (#62813)💫 Enhancements
Configuration
📅 Schedule: (in timezone Europe/Vienna)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.