YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
β οΈ ModelScan Bypass PoC β Joblib Scanner Evasion
SECURITY RESEARCH ONLY. Do NOT load these files in production.
Overview
This repository demonstrates 6 novel methods to bypass ProtectAI's ModelScan (v0.8.8, latest)
through Joblib .joblib model files. All 6 payloads pass ModelScan with "No issues found"
while executing code when loaded with joblib.load().
Bypass Methods
| # | Module | Impact | Scanner Result |
|---|---|---|---|
| 1 | ctypes.CDLL |
Load arbitrary native shared libraries (.so/.dylib) | β CLEAN |
| 2 | http.client.HTTPSConnection |
Silent outbound HTTPS connection (data exfil) | β CLEAN |
| 3 | xmlrpc.client.ServerProxy |
Remote procedure calls (C2 capability) | β CLEAN |
| 4 | io.open |
Arbitrary file write | β CLEAN |
| 5 | logging.config.fileConfig |
Config-based arbitrary class instantiation | β CLEAN |
| 6 | code.compile_command |
Executable code object generation | β CLEAN |
Root Cause
ModelScan's unsafe_globals blocklist in settings.py is incomplete. While it blocks
obvious modules like os, subprocess, sys, and pickle, it misses many standard
library modules with code execution or network capabilities:
ctypesβ Can load arbitrary native code via shared librarieshttp.clientβ Modern replacement for blockedhttplibxmlrpc.clientβ XML-RPC remote procedure callsioβ File I/O operationslogging.configβ Can instantiate arbitrary classes via configcodeβ Code compilation and execution
Reproduction
pip install joblib numpy modelscan
python poc_joblib_scanner_bypass.py
# All 6 payloads: scanner CLEAN, execution confirmed
Tested Against
- ModelScan: 0.8.8 (latest as of March 2026)
- Joblib: 1.5.3
- Python: 3.12.13
Novelty
These bypasses use different module families than prior reports:
- CVE-2025-46417 covered
linecache+ssl(picklescan) - Feb 2026 modelscan-bypass-poc covered
timeit,cProfile,profile,doctest - This report covers
ctypes,http.client,xmlrpc.client,io,logging.config,code
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support