Pickle Scanner Bypass via mailcap.findmatch
Bypasses picklescan and modelscan.
The Vulnerability
Python's deprecated mailcap module (removed in Python 3.13) exposes findmatch() which executes mailcap entry test commands via os.system(). Neither scanner blocks mailcap imports.
How it works
pickle.loads()importsmailcap.findmatch- Calls
findmatch(caps, type, 'view', filename)wherecapscontains a crafted entry with'test': '<shell_command>' findmatch()internally runsos.system(test_command)
Files
malicious.pklโ Minimal pickle payload (140 bytes)poc.pyโ Python script that generates and demonstrates the payload
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support