CVE-2020-28975: scikit-learn - Denial of Service via Crafted Model SVM
Summary
CVE-2020-28975: DISPUTED svm_predict_values in svm.cpp in Libsvm v324, as used in scikit-learn 0.23.2 and other products, allows attackers to cause a denial of service (segmentation fault) via a crafted model SVM (introduced via pickle,... Affects scikit-learn versions < 0.24.dev0. Fixed in 0.24.dev0. 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
scikit-learn is a popular Python library for machine learning tasks. It provides various algorithms and tools for data analysis and modeling. The library includes support for Support Vector Machines (SVM), a supervised learning model used for classification and regression tasks. SVM models can be serialized and persisted using pickle, json, or other model permanence standards.
Vulnerability Detail
The svm_predict_values function in svm.cpp within Libsvm v324, which is used in scikit-learn 0.23.2 and other products, contains a vulnerability that allows attackers to cause a denial of service (segmentation fault). This can be achieved by providing a crafted SVM model with a large value in the _n_support array. The vulnerability arises when the library's API is violated by an application that modifies a private attribute. The impact of this vulnerability is a crash or termination of the application, leading to a denial of service condition.
How To Fix
Latest published version: 1.9.1 as of 23 Oct 2026
pip install --upgrade "scikit-learn==1.9.1"
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.24.dev0
This is the first release that contains the fix.
pip install --upgrade "scikit-learn==0.24.dev0"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is essential to update to the fixed version of scikit-learn to mitigate the risk.
Conclusion
The vulnerability in scikit-learn allows attackers to cause a denial of service by providing a crafted SVM model. To mitigate this risk, it is crucial to update scikit-learn to version 0.24.dev0 or later. For further assistance or support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for scikit-learn →
FAQ
scikit-learn is a Python library for machine learning tasks, providing algorithms and tools for data analysis and modeling.
The vulnerability allows attackers to cause a denial of service by crashing the application using a crafted SVM model.
Update scikit-learn to version 0.24.dev0 or later to fix the vulnerability.
No, there is no known workaround. Updating to the fixed version is necessary.
You can find more information about this vulnerability in the scikit-learn advisory database: https://github.com/pypa/advisory-database/blob/main/vulns/scikit-learn/PYSEC-2020-108.yaml
References
Related vulnerabilities
Recent vulnerabilities recorded for scikit-learn.