Skops has Inconsistent Trusted Type Validation that Enables Hidden `operator` Methods Execution
Date: 2025-07
Affected: pip/skops
Attack vector: rce
Category: vulnerability-disclosure
Severity: High
CVE: CVE-2025-54412
CWE: CWE-351

## Summary An inconsistency in `OperatorFuncNode` can be exploited to hide the execution of untrusted `operator.xxx` methods. This can then be used in a code reuse attack to invoke seemingly safe functions and escalate to arbitrary code execution with minimal and misleading trusted types. **Note:** This report focuses on `operator.call` as it appears to be the most interesting target, but the same technique applies to other `operator` methods. Moreover, focusing on a specific example is not necessary, the `operator.call` invocation was a zero-effort choice meant solely to demonstrate the issue. The key point is the **inconsistency** that allows a user to approve a type as trusted, while in reality enabling the execution of `operator.xxx`. ## Details The `OperatorFuncNode` allows calling methods belonging to the `operator` module and included in a trusted list of methods. However, what is returned by `get_untrusted_types` and checked during the `load` call is not exactly the same as what is actually called. Instead, it is something partially controlled by the model author. This means that the user checking the untrusted types can be tricked into thinking something benign is being used, while in reality the `operator.xxx` method is executed. Let’s look at the implementation of the `OperatorFuncNode`: ```python # from io/_general.py:618-633 class OperatorFuncNode(Node): def __init__( self, state: dict[str, Any], load_context: LoadContext,


Mitigations:

Architectural layers (MAESTRO):