scikit-learn Deserialization of Untrusted Data
Published 24 May 2022 · Updated 22 Oct 2024
Is your project on an affected scikit-learn?
Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- <=0.23.0
- Fixed in
- No fix released
Details
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.
NOTE: third parties dispute this issue because the joblib.load() function is documented as unsafe and it is the user's responsibility to use the function in a secure manner.
Is GHSA-jjw5-xxj6-pcv5 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected scikit-learn, and gives you the command that fixes it.
More advisories for scikit-learn
- MediumCVE-2024-5206scikit-learn sensitive data leakage vulnerability · 6 Jun 2024
- HighCVE-2020-28975scikit-learn Denial of Service · 24 May 2022
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2020-13092
- Linkgithub.com/0FuzzingQ/vuln/blob/master/sklearn%20unserialize.md
- Linkgithub.com/pypa/advisory-database/tree/main/vulns/scikit-learn/PYSEC-2020-107.yaml
- Packagegithub.com/scikit-learn/scikit-learn
- Linkscikit-learn.org/stable/modules/model_persistence.html#security-maintainability-limitations
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.