Remote Code Execution in ZenML CloudpickleMaterializer
ZenML 0.94.6 contains a remote code execution vulnerability in the CloudpickleMaterializer component that allows arbitrary command execution via malicious pickle file injection.
ZenML version 0.94.6 contains a remote code execution vulnerability (CVE-2026-68772) within the CloudpickleMaterializer component. This vulnerability stems from the use of unsanitized cloudpickle.load() calls when materializing artifacts from the artifact store. An attacker who gains write access to the shared artifact store can replace a legitimate artifact.pkl file with a crafted payload containing a malicious __reduce__ method. When a legitimate pipeline or user subsequently materializes this artifact, the Python environment automatically executes the embedded malicious commands. This vulnerability is critical for organizations using shared artifact storage in multi-user environments where local write access or compromised service accounts could allow for persistence or lateral movement within the data pipeline ecosystem.
Attack Chain
- Attacker gains write access to a shared artifact storage location used by ZenML.
- Attacker locates a target
artifact.pklfile used by an active or future pipeline. - Attacker generates a malicious pickle payload using
cloudpicklethat defines a__reduce__method to execute system commands. - Attacker overwrites the legitimate
artifact.pklfile with the malicious payload. - A victim user or automated pipeline execution agent triggers the
CloudpickleMaterializerto process the artifact. - The
CloudpickleMaterializerexecutescloudpickle.load()on the malicious file. - The embedded commands in the
__reduce__method are executed in the security context of the pipeline process. - Attacker gains arbitrary code execution, potentially resulting in exfiltration or further compromise of the compute environment.
Impact
Successful exploitation allows for remote code execution within the context of the pipeline process. This can lead to full system compromise, data exfiltration from the artifact store, or unauthorized access to credentials and sensitive data processed by the data pipelines.
Recommendation
- Upgrade ZenML to a patched version immediately to resolve the unsafe deserialization vulnerability in the CloudpickleMaterializer.
- Restrict write access to shared artifact storage locations to only authorized service accounts or users.
- Monitor file integrity for
artifact.pklfiles within the ZenML artifact store for unauthorized modifications. - Implement strict access control lists (ACLs) on cloud-based artifact storage (e.g., S3, GCS) to ensure only authorized CI/CD pipelines can modify stored objects.
Immediate actions
Upgrade ZenML to patched version
Mitigations
Tighten IAM/ACLs on artifact storage
Unauthorized write access to shared artifact storage