Skip to content

Insecure Deserialization with Scikit Joblib

Description

The use of `joblib.load()` can lead to arbitrary code execution due to its reliance on pickle. Consider using `skops` instead to prevent deserialization of untrusted data.

Examples

Insecure Code

python
joblib.load('model.pkl')

Secure Code

python
skops.load('model.pkl')

Remediation

Replace `joblib.load()` with a secure alternative, such as `skops`.

Rule Details

FieldValue
IDCODE-0462
CategoryDeserialization
SeverityCRITICAL
CWECWE-502
ConfidenceMEDIUM
ImpactHIGH
LikelihoodMEDIUM
ExploitabilityEASY
Tagspickle, deserialization
OWASPN/A

References