PYSEC-2026-2296: Ray: Remote Code Execution via Parquet Arrow Extension Type Deserialization
Ray is an AI compute engine. From version 2.54.0 to before version 2.55.0, Ray Data registers custom Arrow extension types (ray.data.arrowtensor, ray.data.arrowtensorv2, ray.data.arrowvariableshapedtensor) globally in PyArrow. When PyArrow reads a Parquet file containing one of these extension types, it calls arrowextdeserialize on the field's metadata bytes. Ray's implementation passes these bytes directly to cloudpickle.loads(), achieving arbitrary code execution during schema parsing, before any row data is read. This issue has been patched in version 2.55.0.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Rayto a version that resolves this vulnerability.Fixed in 2.55.0
Event History
Frequently Asked Questions
Which Ray versions need remediation?
Ray versions 2.54.0 through versions before 2.55.0 are affected. Upgrade to Ray 2.55.0.
What must happen for exploitation to occur?
A vulnerable Ray environment must use PyArrow to read a Parquet file containing one of Ray's registered Arrow extension types with attacker-controlled metadata. Code execution occurs while PyArrow parses the schema, before it reads row data.
What can be done while an upgrade is pending?
Do not process Parquet files from untrusted sources in affected environments. Treat Parquet schema metadata as potentially malicious, since the payload is deserialized during schema parsing.