Pickle in the Middle – Hijacking Vertex AI Model Uploads for Cross-Tenant RCE

· Source: Unit 42 · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Cybersecurity & Data Privacy, Cloud Computing & IT Infrastructure · Depth: Advanced, long

Summary

A critical "Pickle in the Middle" vulnerability was discovered in Google Cloud's Vertex AI SDK for Python, impacting versions 1.139.0 and 1.140.0. This flaw allowed cross-tenant Remote Code Execution (RCE) without requiring initial access to a victim's project. The attack exploited predictable default Google Cloud Storage (GCS) bucket names and a missing ownership check during model uploads. An attacker could "bucket squat" by preemptively creating a bucket with the victim's default name. When a victim uploaded a model via the SDK without specifying a custom staging bucket, their artifacts were silently staged in the attacker's bucket. Within a 2.5-second window, the attacker replaced the legitimate model with a malicious `pickle` payload. Upon deployment, this payload executed arbitrary code, enabling data exfiltration, lateral movement, and compromise of the victim's cloud environment. Google fixed the issue in SDK versions 1.144.0 (March 31, 2026) and 1.148.0 (April 15, 2026) by adding random UUIDs to bucket names and implementing explicit ownership verification.

Key takeaway

For MLOps Engineers or AI Security Engineers deploying models on Google Cloud Vertex AI, you must immediately upgrade your `google-cloud-aiplatform` SDK to version 1.148.0 or newer. Failure to update leaves your model uploads vulnerable to cross-tenant Remote Code Execution via bucket squatting and `pickle` deserialization. Additionally, always explicitly specify a custom `staging_bucket` parameter during `Model.upload()` to ensure full asset isolation and prevent unintended staging in attacker-controlled storage. This mitigates the risk of model poisoning and credential theft.

Key insights

The Vertex AI SDK's predictable default bucket naming and lack of ownership checks enabled cross-tenant RCE via model poisoning.

Principles

Method

Attacker bucket-squats a predictable GCS bucket, grants public write access. Victim uploads model to squatted bucket. Attacker replaces model with `pickle` RCE payload via Cloud Function. Victim deploys poisoned model.

In practice

Topics

Code references

Best for: CTO, VP of Engineering/Data, Director of AI/ML, AI Security Engineer, MLOps Engineer, AI Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Unit 42.