CVE-2025-54886: SKOPS Arbitrary Code Execution via Card.get_model
Summary
CVE-2025-54886: SKOPS Card.get_model happily allows arbitrary code execution. Affects skops versions < 0.13.0. Fixed in 0.13.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 managing and loading machine learning models securely. It provides functionalities to load models in a safe manner, ensuring that only trusted models are executed. However, a vulnerability has been identified in the Card.get_model function, which can lead to arbitrary code execution if not properly managed.
Vulnerability Detail
The vulnerability arises from the Card.get_model function, which allows loading models using both skops and joblib libraries. While skops is designed to be secure, joblib does not enforce the same security measures, allowing for arbitrary code execution when loading untrusted model files. This occurs silently when a non-zip file is provided, leading to potential exploitation by attackers who can craft malicious model files that execute code on the victim's machine without any indication of risk.
How To Fix
Minimum fixed version
0.13.0
This is the first release that contains the fix.
pip install --upgrade "skops==0.13.0"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, ensure that only trusted model files are loaded and avoid using joblib for loading models. You can explicitly check the file type before loading, as shown in the following code snippet:
import zipfile
from skops.card import Card
model_path = 'model.skops'
if zipfile.is_zipfile(model_path):
card = Card(model_path)
clf = card.get_model()
else:
raise ValueError('Untrusted model file format. Please provide a .skops file.')
Conclusion
The vulnerability identified in the SKOPS library poses a significant risk due to the potential for arbitrary code execution. It is crucial for users to update to the patched version and implement recommended workarounds to mitigate risks until they can upgrade.
See every vulnerability recorded for skops →
FAQ
CVE-2025-54886 is a vulnerability in the SKOPS library that allows for arbitrary code execution through the Card.get_model function.
You can check if your application is affected by using the Vulert playground at Vulert Scanner, which monitors open-source vulnerabilities without requiring installation.
The CVSS score of this vulnerability is 8.4, indicating a high severity level.
If you cannot update the package, ensure that you only load trusted model files and implement checks to prevent loading untrusted formats.
The implications include the potential for attackers to execute arbitrary code on a victim's machine, leading to data breaches or system compromise.
References
Related vulnerabilities
Recent vulnerabilities recorded for skops.