INCIDENT MAP

Browse / Unsafe Model Loading and Supply Chain / CVE-2020-13092

scikit-learn Deserialization of Untrusted Data

CVE-2020-13092 ยท 2022-05-24 critical

Class
Unsafe Model Loading and Supply Chain (filed by a model that read the advisory)
Technique
Unsafe deserialisation
Affected
scikit-learn (PyPI)
CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
3.5% chance of exploitation in 30 days

How it works, in short

Loading a crafted joblib model file runs attacker-chosen commands embedded through a reduce method during unpickling. (Our summary, written by a model. The source text is below.)

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.

References

Source: GitHub Advisory Database, used under CC BY 4.0.