CVE-2025-54886 in skopsinfo

Summary

by MITRE • 08/08/2025

skops is a Python library which helps users share and ship their scikit-learn based models. In versions 0.12.0 and below, the Card.get_model does not contain any logic to prevent arbitrary code execution. The Card.get_model function supports both joblib and skops for model loading. When loading .skops models, it uses skops' secure loading with trusted type validation, raising errors for untrusted types unless explicitly allowed. However, when non-.zip file formats are provided, the function silently falls back to joblib without warning. Unlike skops, joblib allows arbitrary code execution during loading, bypassing security measures and potentially enabling malicious code execution. This issue is fixed in version 0.13.0.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 08/09/2025

The vulnerability identified as CVE-2025-54886 resides within the skops Python library, a tool designed to facilitate the sharing and deployment of scikit-learn machine learning models. This library serves as a bridge between model development and production environments, enabling users to serialize and deserialize machine learning models while maintaining compatibility across different systems. The security flaw manifests in the Card.get_model function which handles model loading operations for various formats including both skops and joblib serialization methods. The vulnerability represents a critical security gap that could enable remote code execution when processing untrusted model files.

The technical flaw stems from insufficient input validation and improper fallback mechanisms within the Card.get_model function. When processing model files, the function correctly implements secure loading practices for .skops formatted files by leveraging skops' built-in type validation and trusted loading mechanisms that prevent arbitrary code execution. However, the implementation fails to properly handle non-.zip file formats which trigger an automatic fallback to joblib loading without any user notification or security warning. This silent fallback behavior creates a security boundary that bypasses the intended protection mechanisms, as joblib's loading process does not perform the same type validation checks that skops employs, leaving the system vulnerable to malicious code injection during model deserialization.

The operational impact of this vulnerability extends beyond simple code execution to encompass potential system compromise and data exfiltration capabilities. An attacker who can influence the model loading process could craft malicious model files that, when processed through the vulnerable skops library, would execute arbitrary code on the target system with the privileges of the user running the application. This threat model aligns with CWE-502, which describes "Deserialization of Untrusted Data" as a common vulnerability pattern where applications deserialize data without proper validation, leading to arbitrary code execution. The vulnerability's exploitation requires minimal prerequisites since it leverages the legitimate functionality of the library, making it particularly dangerous as it can be triggered through normal model loading workflows.

The security implications of this vulnerability are further amplified by the ATT&CK framework's T1059.001 technique, which covers "Command and Scripting Interpreter: Python" as a method for executing code. Attackers could potentially use this vulnerability to establish persistent access, escalate privileges, or perform lateral movement within compromised environments. The silent fallback behavior makes detection particularly challenging, as administrators would not receive any warnings about the security boundary being crossed. Additionally, the vulnerability affects all versions 0.12.0 and below, representing a significant portion of the user base that would require immediate remediation.

Mitigation strategies should focus on immediate version upgrades to 0.13.0 or later, which contain the necessary fixes for this vulnerability. Organizations should also implement strict model validation policies, including file format verification and content scanning before model loading operations. The security architecture should enforce explicit permission checks for model loading operations and maintain detailed logging of all model loading activities to detect potential exploitation attempts. Furthermore, implementing network segmentation and access controls around systems that process untrusted model files can reduce the potential impact of successful exploitation attempts. Security teams should also consider implementing automated vulnerability scanning processes that can identify systems running vulnerable versions of the skops library to ensure rapid remediation across the entire infrastructure.

Responsible

GitHub M

Reservation

07/31/2025

Disclosure

08/08/2025

Moderation

accepted

CPE

ready

EPSS

0.01344

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!