Modelscan ctypes RCE Bypass PoC
Security research - modelscan bypass via ctypes.CDLL + operator.methodcaller.
DO NOT LOAD THESE FILES - they contain proof-of-concept code execution payloads.
Vulnerability
modelscan does not block the ctypes module or operator.methodcaller.
This allows crafting pickle files that:
- Load libc via
ctypes.CDLL("libc.so.6") - Call
system()to execute arbitrary commands - Pass modelscan with "No issues found"
Affected
- modelscan 0.7.x and earlier
- Any system relying on modelscan to detect malicious pickle files
Modules Used
ctypes.CDLL- not in unsafe_globals blocklistoperator.methodcaller- onlyoperator.attrgetteris blocked
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support