/

CVE-2026-31230

Severity:

CRITICAL RISK

(9.8)

Command Argument Code Injection (CWE-94) in ART Kubeflow

CVE-2026-31230

Deferred

Vulnerability type

Category:

Command Injection / Code Injection

CWE:

CWE-88, CWE-94

Impact:

Arbitrary 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

A command-line argument injection flaw in ART's Kubeflow evaluation script allows arbitrary Python code execution via the --clip_values and --input_shape parameters.

When an attacker can influence these arguments through pipeline configuration or automation, the use of eval() on untrusted strings can lead to full code execution on the host running the robustness evaluation.

Affected context

This vulnerability arises in environments where ART's Kubeflow component uses the robustness_evaluation_fgsm_pytorch.py script as part of machine learning evaluation pipelines.

It is most relevant when command-line parameters are sourced from external configuration, pipeline orchestration systems, or automated scripts that may be modified or influenced by users or other services.

The risk increases in shared or multi-tenant ML platforms, CI/CD setups, or automated evaluation workflows where argument values are constructed dynamically without strict validation or sanitization.

Exploit preconditions

  • Attack surface: CLI invocation of robustness_evaluation_fgsm_pytorch.py within Kubeflow or similar pipeline contexts
  • Required access: Ability to control or modify values passed to --clip_values and/or --input_shape (e.g., pipeline spec, config files, job parameters, or automation scripts)
  • Trigger point: Script startup when it parses these arguments and calls eval() on the provided string values
  • Why exploitation is possible: The script directly evaluates attacker-controlled strings as Python expressions, enabling arbitrary code execution instead of constrained argument parsing

Why this happens

The core issue is the use of eval() to interpret command-line argument values, treating unvalidated user input as executable Python code.

This maps to CWE-94: Improper Control of Generation of Code ('Code Injection'), where data intended to configure behavior is instead executed, and to CWE-88: Argument Injection or Modification, since the malicious payload is delivered through command-line arguments.

Conceptually, the script blurs the boundary between configuration and code: it assumes argument values are safe expressions, allowing an attacker to embed function calls, imports, or other logic that runs with the script's privileges.

Potential impact

  • Arbitrary Python code execution in the context of the ART evaluation environment
  • Reading, modifying, or deleting local files accessible to the evaluation process
  • Exfiltration of ML models, training data, or pipeline secrets
  • Installation of backdoors or persistence mechanisms on the host
  • Lateral movement to other services reachable from the compromised environment

General mitigation guidance

Mitigation centers on eliminating dynamic code evaluation for configuration inputs and enforcing strict parsing of arguments.

Recommended design patterns include:

  • Replace eval() with structured parsing (e.g., literal_eval, dedicated argument types, or custom parsing functions that treat input as data, not code)
  • Define explicit schemas and expected types for command-line arguments and validate against them before use
  • Treat pipeline configuration and CLI parameters as untrusted inputs, even when produced by automation, and sanitize or normalize values accordingly
  • Run evaluation components with least privilege, limiting filesystem access, network reachability, and available credentials so that any compromise has constrained impact
  • Prefer secure-by-default argument handling APIs that prevent arbitrary expression evaluation and avoid reflection-based shortcuts in production scripts

How teams detect issues like this

Effective detection relies on combining static analysis, code review, and configuration governance:

  • Use static analysis rules to flag eval(), exec(), and similar dynamic execution constructs, especially in argument-parsing or configuration-handling code paths
  • During code review, treat any use of generic evaluation or reflection in CLI scripts as a high-risk pattern and require explicit justification or refactoring
  • Implement security policies in CI/CD that block merges when dangerous APIs appear in new or modified code, or when argument parsing bypasses validation
  • Review pipeline and Kubeflow configurations for user-controllable parameters that are later transformed into code or expressions
  • Employ automated configuration scanning to detect suspicious payloads or anomalous argument values in stored pipeline specs and job templates

Sources

SourceLink
github.comgithub.com/Trusted-AI/adversarial-robustness-toolbox
notion.sonotion.so/CVE-2026-31230-35d1e13931888126b624d12769c0e040
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-31230
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2476634
security.access.redhat.comsecurity.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-31230.json

Frequently asked

questions

It can be exploitable remotely when attackers can control pipeline parameters or job configurations that feed into the script's command-line arguments, even if they do not have direct shell access to the host.

The attacker needs the ability to modify the values passed to --clip_values and/or --input_shape, which could come from editing Kubeflow pipeline definitions, CI job specs, or other automation that constructs the command line.

Remove eval() and any dynamic code execution from argument handling, replace it with strict data parsing functions, and enforce strong validation against a well-defined schema for all configuration inputs.

Adopt secure coding guidelines that forbid dynamic evaluation of user-supplied data, require review of argument parsing code, treat pipeline configuration as untrusted input, and integrate static analysis or policy checks into development and deployment workflows.

Find out what's already
exploitable in your codebase.