Skip to content
MagnaNet Network MagnaNet Network

  • Home
  • About Us
    • About Us
    • Advertising Policy
    • Cookie Policy
    • Affiliate Disclosure
    • Disclaimer
    • DMCA
    • Terms of Service
    • Privacy Policy
  • Contact Us
  • FAQ
  • Sitemap
MagnaNet Network
MagnaNet Network

Critical ‘Pickle in the Middle’ Flaw in Google Cloud Vertex AI SDK Allowed Remote Model Hijacking and Code Execution

Cahyo Dewo, June 17, 2026

A severe vulnerability discovered in the Google Cloud Vertex AI SDK for Python enabled an attacker, without requiring any prior access to a victim’s project, to hijack the victim’s machine learning model upload process and execute arbitrary code within Google’s secure serving infrastructure. This sophisticated attack vector underscores the complex security challenges inherent in modern cloud-based machine learning platforms and the critical need for robust validation mechanisms at every stage of the MLOps pipeline.

Unpacking the ‘Pickle in the Middle’ Vulnerability

The vulnerability, dubbed "Pickle in the Middle" by Palo Alto Networks Unit 42, which identified and responsibly disclosed the flaw, represented a significant bypass of standard cloud security controls. Unlike typical exploits that rely on stolen credentials, phishing, or a pre-existing foothold within a target’s environment, this attack merely required the attacker to possess their own Google Cloud project and the victim’s project ID. The latter piece of information is frequently publicly available, making the attack surface remarkably broad. Unit 42 confirmed that they observed no exploitation of this technique in the wild, and Google has since deployed a comprehensive patch. Users of the Vertex AI SDK are strongly advised to update to version 1.148.0 or later to ensure protection.

At its core, the flaw resided in the Google Cloud Vertex AI SDK for Python’s mechanism for selecting a temporary Cloud Storage bucket during the model upload process. When a user failed to explicitly define a staging bucket, the SDK automatically generated a default name using a predictable pattern: project-vertex-staging-region. For instance, a project in the us-central1 region with the ID my-ml-project might default to a bucket named my-ml-project-vertex-staging-us-central1. The critical oversight was that while the SDK checked for the existence of such a bucket, it failed to verify ownership.

Because Cloud Storage bucket names are globally unique across the entire Google Cloud ecosystem, an attacker could pre-emptively create a bucket with the anticipated name within their own Google Cloud project. When the unsuspecting victim initiated a model upload without specifying a staging_bucket parameter, their SDK, operating under the assumption that the automatically generated bucket would be legitimate and under their control, would proceed to upload the model files directly to the attacker’s pre-registered bucket. Once the legitimate model was uploaded to the attacker-controlled bucket, the attacker could swiftly replace it with a malicious version.

The Mechanism of Exploitation: Deserialization and Race Conditions

The second crucial component of the "Pickle in the Middle" attack hinged on the common practice of saving Python machine learning models using serialization libraries like pickle or joblib. These libraries allow Python objects, including complex ML models and their associated logic, to be converted into a byte stream (serialized) and then reconstructed (deserialized) later. While convenient, pickle and joblib are notorious for their security risks, as deserializing untrusted data can lead to arbitrary code execution. This is because a serialized Python object can contain instructions to execute code upon deserialization.

Google Vertex AI SDK Flaw Let Attackers Hijack Model Uploads via Bucket Squatting

In this scenario, once the attacker replaced the legitimate model with a malicious one containing specially crafted pickle or joblib payload, the Vertex AI serving infrastructure would later load this compromised model. When the serving container deserialized the malicious model, the attacker’s embedded code would automatically execute within the isolated, Google-managed environment. This represented a direct path to remote code execution (RCE) without requiring any traditional authentication or authorization steps on the victim’s project.

The success of the attack also depended on a critical timing element, effectively a race condition. Unit 42 researchers measured a window of approximately 2.5 seconds between the victim’s initial model upload to the attacker’s bucket and Vertex AI’s subsequent reading of that file for deployment. To exploit this narrow window, the attackers developed a proof-of-concept (PoC) that leveraged a Google Cloud Function. This function was configured to trigger automatically upon an object upload event to the attacker’s pre-staged bucket. Upon activation, the Cloud Function would swiftly replace the newly uploaded legitimate model with the malicious payload, accomplishing the swap in a mere 1.4 seconds – well within the critical 2.5-second timeframe before Vertex AI could access the original, uncompromised file. This demonstrated the feasibility and practical exploitability of the timing-dependent attack.

Profound Implications: Data Exfiltration and Lateral Movement

The execution of arbitrary code within the Vertex AI serving container opened a Pandora’s box of potential malicious activities. Unit 42’s payload, for instance, was designed to steal an OAuth token from the serving container’s metadata server. The metadata server provides credentials and configuration information to instances running in Google Cloud, and access to these tokens is highly privileged.

Critically, in Unit 42’s controlled test environment, the stolen OAuth token was not confined to the compromised model deployment alone. It granted broader access to other model artifacts residing within the same Google-managed tenant project. This meant an attacker could potentially access and exfiltrate sensitive data such as:

  • Full TensorFlow models, including proprietary trained weights and architectural details, representing significant intellectual property.
  • BigQuery metadata, potentially revealing sensitive data schemas, table structures, and project configurations.
  • Access lists, providing insights into user permissions and roles within the tenant project.
  • Tenant logs, which could contain sensitive operational data, debugging information, or even personally identifiable information (PII).
  • Google Kubernetes Engine (GKE) cluster names and internal container image paths, potentially mapping out the underlying infrastructure and identifying further targets for exploitation or reconnaissance.

This level of access highlights the severe implications of the "Pickle in the Middle" attack. It moved beyond mere denial-of-service or single-resource compromise, offering a pathway to significant data exfiltration, intellectual property theft, and potential lateral movement within Google’s shared-tenant infrastructure. The ability to poison or tamper with other models could also have devastating consequences for data integrity and the reliability of AI systems.

Discovery, Disclosure, and Google’s Swift Response

The "Pickle in the Middle" vulnerability was meticulously discovered and documented by security researchers at Palo Alto Networks Unit 42. Their commitment to responsible disclosure led them to report the flaw to Google through its Vulnerability Reward Program on March 5, 2026. At the time of their research, Unit 42 confirmed that Vertex AI SDK versions 1.139.0 and 1.140.0, which were the latest available, were both susceptible to the attack.

Google Vertex AI SDK Flaw Let Attackers Hijack Model Uploads via Bucket Squatting

Google, upon receiving the report, acted with commendable speed and diligence. An initial mitigation was rolled out in SDK version 1.144.0 on March 31, 2026. This fix addressed the predictability aspect of the bucket naming by incorporating a random uuid4 into the generated bucket name. While this significantly complicated an attacker’s ability to pre-register a bucket with the exact anticipated name, it did not fully eliminate the theoretical possibility of a race condition under extremely specific circumstances.

The comprehensive and definitive fix arrived with SDK version 1.148.0, released on April 15, 2026. This update introduced a crucial bucket ownership verification step into the Model.upload() function. With this enhancement, the SDK now not only checks for the existence of a bucket but also explicitly verifies that the user initiating the upload is indeed the owner of that bucket. This ownership check effectively blocks any "bucket squatting" attempts, making the "Pickle in the Middle" attack unfeasible. As of the publication date of Unit 42’s findings, a Common Vulnerabilities and Exposures (CVE) identifier for this specific issue had not yet been assigned, a common practice for recently patched vulnerabilities as the process can take time.

Google’s prompt response through its Vulnerability Reward Program (VRP) demonstrates the effectiveness of collaborative security efforts between cloud providers and independent researchers. Such programs are vital for identifying and remediating critical vulnerabilities before they can be exploited maliciously in the wild.

Recommendations for Enhanced Security

To safeguard against this specific vulnerability and similar potential threats, developers and organizations utilizing Google Cloud Vertex AI are urged to take immediate action:

  1. Update the SDK: The most critical step is to update the google-cloud-aiplatform SDK to version 1.148.0 or later. This ensures that the essential bucket ownership verification logic is active and protecting your model uploads. It is imperative to check the SDK version across all environments where it might run, including local development notebooks, continuous integration (CI) jobs, automated training pipelines, and production serving services.
  2. Explicitly Set Staging Buckets: As a best practice, always explicitly define and control the staging_bucket parameter when uploading models. By pointing to a Cloud Storage location that you specifically own and manage, you eliminate reliance on the SDK’s default naming conventions and add an extra layer of security. This ensures that your model artifacts are always directed to a trusted storage location.
  3. Implement Principle of Least Privilege: Ensure that the service accounts or user identities performing model uploads have only the necessary permissions. Over-privileged accounts can exacerbate the impact of any compromised component.
  4. Regular Security Audits: Conduct regular security audits of your MLOps pipelines and cloud infrastructure to identify potential misconfigurations or vulnerabilities. This includes reviewing Cloud Storage bucket policies, identity and access management (IAM) roles, and data flow.
  5. Secure Deserialization Practices: Be highly cautious with deserializing untrusted or externally sourced data, especially with libraries like pickle or joblib. If models are exchanged between different parties, consider safer, language-agnostic serialization formats (e.g., ONNX, Protocol Buffers, JSON) or ensure rigorous integrity checks and sandboxing.

Broader Landscape of Cloud ML Security

The "Pickle in the Middle" vulnerability is not an isolated incident but rather indicative of the evolving threat landscape in cloud machine learning. It is the second predictable-bucket-name flaw to surface in Vertex AI within a relatively short period this year. Just in February, Google patched CVE-2026-2473, a separate bucket-squatting bug found in Vertex AI Experiments. That vulnerability also enabled cross-tenant code execution, model theft, and model poisoning, mirroring the severe consequences of the "Pickle in the Middle" attack.

Furthermore, Unit 42’s earlier research delved into Vertex AI’s default service-agent permissions, tracing a path from a deployed AI agent to potentially accessing sensitive customer and tenant data. These findings collectively paint a picture of the inherent complexities and potential attack vectors within sophisticated cloud ML platforms. The shared responsibility model in cloud computing means that while providers like Google secure the underlying infrastructure, users bear the responsibility for securing their applications, data, and configurations. However, vulnerabilities in SDKs or default platform behaviors can blur these lines, requiring continuous vigilance from both sides.

Google Vertex AI SDK Flaw Let Attackers Hijack Model Uploads via Bucket Squatting

The rise of AI and machine learning has introduced new dimensions to cybersecurity. MLOps pipelines involve numerous stages – data ingestion, model training, versioning, deployment, and monitoring – each presenting potential points of vulnerability. From adversarial attacks on models themselves to supply chain compromises through tainted data or dependencies, securing AI systems is a multi-faceted challenge. Flaws like "Pickle in the Middle" highlight the importance of secure-by-design principles in SDKs and client-side tooling, as well as the need for robust verification mechanisms that account for the unique characteristics of cloud environments, such as global namespace uniqueness and shared tenancy.

Analysis of Implications and Future Outlook

The discovery and remediation of the "Pickle in the Middle" vulnerability serve as a crucial reminder for the entire AI/ML community. For cloud providers, it emphasizes the need for exhaustive security reviews of client-side libraries and default configurations, particularly those that interact with global resources like Cloud Storage. The predictable naming convention, while seemingly innocuous, became the critical entry point for a sophisticated attack.

For developers and organizations, the incident underscores the paramount importance of not relying solely on default settings, especially in security-sensitive operations. Explicitly defining resources, understanding the underlying mechanisms of cloud SDKs, and maintaining a proactive patching regimen are non-negotiable practices. The risk of supply chain attacks, where an attacker injects malicious code or data at any stage of the development or deployment pipeline, is particularly acute in AI/ML given the reliance on numerous libraries, frameworks, and data sources.

While Google’s rapid response and comprehensive fix are commendable, the continuous discovery of such vulnerabilities highlights that the arms race in cloud security is ongoing. As AI adoption accelerates, attackers will increasingly target these complex environments, seeking out subtle flaws in logic or implementation. This necessitates an ongoing collaboration between security researchers, cloud providers, and the user community to proactively identify, disclose, and remediate vulnerabilities, ensuring the integrity and trustworthiness of AI systems deployed in the cloud. The "Pickle in the Middle" attack, though patched, will undoubtedly serve as a case study for future secure MLOps practices and cloud platform design.

Cybersecurity & Digital Privacy allowedCloudcodecriticalCybercrimeexecutionflawgoogleHackinghijackingmiddlemodelpicklePrivacyremoteSecurityvertex

Post navigation

Previous post
Next post

Recent Posts

⚡ Weekly Recap: Fast16 Malware, XChat Launch, Federal Backdoor, AI Employee Tracking & MoreThe Evolving Landscape of Telecommunications in Laos: A Comprehensive Analysis of Market Dynamics, Infrastructure Growth, and Future ProspectsTelesat Delays Lightspeed LEO Service Entry to 2028 While Expanding Military Spectrum Capabilities and Reporting 2025 Fiscal PerformanceThe Internet of Things Podcast Concludes After Eight Years, Charting a Course for the Future of Smart Homes
Anthropic Expands Managed Agents with Advanced "Dreaming," Outcome-Focused Capabilities, and Multi-Agent OrchestrationSupermetal Achieves Dramatic Performance Gains in Iceberg Data Ingestion BenchmarkAWS Recognizes Three Exceptional Leaders as Newest Heroes for Driving Global Tech Community GrowthHawkEye 360 Files to Go Public, Reports $99M in Revenue in 2025
The Evolution of AI Factories: Rethinking Infrastructure Design to Overcome Historic Constraints in the Era of Massive ScaleAWS Launches Graviton5-Powered EC2 M9g and M9gd Instances, Marking a New Era for Cloud Compute and AI WorkloadsUnraveling the Myth: Why Your Smartphone Isn’t Listening to Your Conversations, But Still Knows Your Next Travel DestinationThe Internet of Things Podcast Concludes After Eight Years, Shifting Focus to Future of Connected Living

Categories

  • AI & Machine Learning
  • Blockchain & Web3
  • Cloud Computing & Edge Tech
  • Cybersecurity & Digital Privacy
  • Data Center & Server Infrastructure
  • Digital Transformation & Strategy
  • Enterprise Software & DevOps
  • Global Telecom News
  • Internet of Things & Automation
  • Network Infrastructure & 5G
  • Semiconductors & Hardware
  • Space & Satellite Tech
©2026 MagnaNet Network | WordPress Theme by SuperbThemes