CVE-2025-54412: Skops Inconsistent Trusted Type Validation Leading to Arbitrary Code Execution
Summary
CVE-2025-54412: Skops has Inconsistent Trusted Type Validation that Enables Hidden operator Methods Execution. Affects skops versions < 0.12.0. Fixed in 0.12.0. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Skops is a Python library designed for saving and loading machine learning models in a secure and efficient manner. It allows users to serialize models into a format that can be easily shared and reused. However, the library has a vulnerability that arises from its handling of trusted types, which can lead to serious security issues if exploited. This vulnerability is particularly concerning in collaborative environments where model sharing is common.
Vulnerability Detail
The vulnerability stems from an inconsistency in the OperatorFuncNode class, which allows untrusted operator.xxx methods to be executed under the guise of trusted types. This inconsistency can be exploited by an attacker to craft a malicious model file that appears safe but can execute arbitrary code when loaded. The attacker can manipulate the schema.json file to mislead users into trusting seemingly benign types while executing harmful operations in the background. The potential ramifications include unauthorized access to the victim's system and execution of arbitrary commands, posing a significant risk to users.
How To Fix
Latest published version: 0.16.0 as of 23 Oct 2026
pip install --upgrade "skops==0.16.0"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
0.12.0
This is the first release that contains the fix.
pip install --upgrade "skops==0.12.0"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, users should avoid loading models from untrusted sources or inspect the contents of model files before loading them. Additionally, users can implement stricter checks on the types being trusted during the loading process to mitigate the risk of executing untrusted code.
Conclusion
CVE-2025-54412 represents a significant security risk for users of the Skops library, allowing for arbitrary code execution through inconsistent trusted type validation. Users are strongly advised to update to the latest version of the package and implement best practices for model loading to mitigate potential risks.
See every vulnerability recorded for skops →
FAQ
CVE-2025-54412 is a vulnerability in the Skops library that allows for arbitrary code execution due to inconsistent trusted type validation.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
The vulnerability can lead to unauthorized execution of arbitrary code, which may compromise the security of the user's system.
You can update the Skops package by running the command: pip install --upgrade skops in your terminal.
If you cannot update the package, avoid loading models from untrusted sources and inspect model files carefully before loading.
References
Related vulnerabilities
Recent vulnerabilities recorded for skops.