/

CVE-2026-31229

Severity:

CRITICAL RISK

(9.8)

Unsafe Deserialization in ART Kubeflow Component

CVE-2026-31229

Deferred

Vulnerability type

Category:

Unsafe Deserialization

CWE:

CWE-502

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

The Adversarial Robustness Toolbox (ART) Kubeflow component unsafely deserializes PyTorch model files using torch.load() without the weights_only=True restriction, allowing arbitrary Python object loading via Pickle.

If an attacker can cause the pipeline to load a malicious model file, they can execute arbitrary code in the Kubeflow environment, resulting in remote code execution during robustness evaluation.

Affected context

This vulnerability appears in Kubeflow-based robustness evaluation pipelines that integrate ART and load PyTorch models from external storage.

The risk is present when:

  • Model weights or artifacts are loaded from user-controlled or semi-trusted locations (e.g., object storage, shared buckets), and
  • The Kubeflow component directly passes these paths or model_id values to torch.load() without restricting what can be deserialized.

Environments where multiple teams or automated systems can influence model artifacts or pipeline parameters are particularly exposed.

Exploit preconditions

  • Attack surface: The model loading interface of the ART Kubeflow component (e.g., model file paths, model_id inputs, or referenced object storage locations).
  • Required access: Ability to upload or modify model files in a storage location used by the pipeline, or to influence the model_id/path so it points to an attacker-controlled artifact.
  • Trigger point: Execution of robustness evaluation or related Kubeflow pipeline steps that invoke torch.load() on the compromised model file.
  • Why exploitation is possible: torch.load() without weights_only=True will unpickle arbitrary Python objects embedded in the model file, and Pickle object construction hooks can execute attacker-controlled code during deserialization.

Why this happens

The core issue is the use of a generic, Pickle-backed deserialization mechanism on data that may be influenced by untrusted parties.

In this case, the ART Kubeflow component uses torch.load() in its default mode, which leverages Python's Pickle protocol and is capable of reconstructing arbitrary Python objects, not just tensor weights.

Because no restriction (such as weights_only=True or a custom, safe loading routine) is applied, and the origin of the model files is not strongly trusted or validated, the code effectively treats serialized input as executable logic.

This pattern matches CWE-502: Deserialization of Untrusted Data, where a deserializer with broad capabilities is applied to untrusted or semi-trusted data inputs.

Potential impact

  • Remote code execution within the Kubeflow pipeline worker or container context
  • Theft or tampering of training data, test data, or model artifacts accessible from the compromised environment
  • Manipulation of robustness evaluation results, including targeted data or model poisoning
  • Lateral movement to other services or nodes reachable from the compromised Kubeflow runtime
  • Disruption of ML workflows, including denial of service for robustness or evaluation jobs

General mitigation guidance

Effective mitigation focuses on limiting what deserialization can do and constraining trust boundaries around model artifacts:

  • Prefer restricted deserialization APIs for PyTorch models, such as using torch.load() with weights_only=True or equivalent patterns that deserialize only tensors and state dictionaries, not arbitrary Python objects.
  • Treat model files as untrusted input by default; apply strict validation and allowlists for model sources (e.g., approved buckets, signed artifacts, or CI-produced models only).
  • Where possible, separate model transport from executable logic, using formats that do not rely on Pickle (e.g., TorchScript, ONNX, or other non-code-based representations).
  • Apply least-privilege configurations to Kubeflow workers so that, if code execution occurs, the process has minimal access to filesystem, network, and cloud metadata.
  • Introduce defense-in-depth controls such as read-only mount points for model directories and network segmentation around Kubeflow pipelines.

How teams detect issues like this

Detection generally combines code-level inspection with runtime monitoring:

  • Use static analysis or code search to flag uses of torch.load() (and other Pickle-backed APIs) that lack explicit security parameters (e.g., missing weights_only=True) or operate on non-constant paths.
  • Add code review checklists that require reviewers to scrutinize any deserialization of model artifacts, especially in ML pipelines interacting with shared or external storage.
  • Implement CI policies or linters that block merges when unsafe deserialization patterns are detected in Kubeflow components or related utilities.
  • At runtime, monitor for unexpected process behavior during model loading (e.g., network calls, shell invocation, or file modifications originating from a model load step) using host-based intrusion detection or container security tools.

Sources

SourceLink
github.comgithub.com/Trusted-AI/adversarial-robustness-toolbox
notion.sonotion.so/CVE-2026-31229-35d1e13931888172863dcc20beeb6b70

Frequently asked

questions

It can be, depending on how the Kubeflow pipeline is exposed. If an attacker can remotely upload or control model files in storage locations used by the pipeline, or can influence pipeline parameters such as model_id through an API or UI, then remote exploitation is feasible.

The attacker must be able to place or modify a malicious model artifact where the pipeline will read it, or control the reference to that artifact. This could be access to a shared object store, a CI stage that publishes models, or a parameterized pipeline interface that accepts user-specified model identifiers.

The most robust pattern is to avoid full Pickle-based deserialization for untrusted model artifacts. Use restricted loading (e.g., weights_only=True with torch.load() or equivalent), avoid arbitrary object reconstruction, and ensure that only vetted, trusted sources can supply model files consumed by the pipeline.

Embed deserialization safety into development standards: treat all serialized data and model artifacts as untrusted, mandate safe loading APIs, require security review for ML pipeline components, and enforce these rules with automated checks in CI and static analysis tools.

Find out what's already
exploitable in your codebase.