CVE-2020-13092: scikit-learn Untrusted File Execution
Summary
CVE-2020-13092: DISPUTED scikit-learn (aka sklearn) through 0.23.0 can unserialize and execute commands from an untrusted file that is passed to the joblib.load() function, if reduce makes an os.system call. Affects scikit-learn versions < 0.23.1. Fixed in 0.23.1. How to fix ↓
Also tracked for
- scikit-learn · Debian:11
The same CVE-2020-13092 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
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 (aka sklearn) is a popular Python library for machine learning. It provides various algorithms and tools for data analysis and modeling. The library is widely used in the Python ecosystem and is available on PyPI. However, scikit-learn versions up to 0.23.0 are vulnerable to a remote code execution vulnerability.
Vulnerability Detail
The vulnerability (CVE-2020-13092) in scikit-learn allows an attacker to execute arbitrary commands from an untrusted file. This can occur when the joblib.load() function is used to deserialize objects and the reduce method of the deserialized object makes an os.system call. The issue arises due to the unsafe nature of the joblib.load() function and the responsibility of the user to use it securely. However, there is a dispute among third parties regarding the severity of this issue.
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.23.1
This is the first release that contains the fix.
pip install --upgrade "scikit-learn==0.23.1"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a workaround, users can avoid using the joblib.load() function with untrusted files or ensure that the files being loaded are from trusted sources. It is important to exercise caution when deserializing objects from untrusted sources.
Conclusion
scikit-learn versions up to 0.23.0 are vulnerable to a remote code execution vulnerability. Users should upgrade to version 0.23.1 or later to mitigate the risk. Exercise caution when deserializing objects from untrusted sources. For further support on vulnerability remediation, contact DevNack.com.
See every vulnerability recorded for scikit-learn →
FAQ
scikit-learn is a Python library for machine learning, providing various algorithms and tools for data analysis and modeling.
The vulnerability allows an attacker to execute arbitrary commands from an untrusted file, potentially leading to remote code execution.
Versions up to 0.23.0 of scikit-learn are affected by this vulnerability.
To fix this vulnerability, upgrade to scikit-learn version 0.23.1 or later.
As a workaround, avoid using the joblib.load() function with untrusted files or ensure that the files being loaded are from trusted sources.
References
Related vulnerabilities
Recent vulnerabilities recorded for scikit-learn.