Security PoC: Joblib Compressed Pickle Scanner Bypass
WARNING: This repository contains proof-of-concept files that demonstrate a security vulnerability. The files execute benign commands (echo + id) to prove arbitrary code execution. Do not modify the payload to include harmful commands.
Vulnerability
Joblib compressed pickle files bypass both PickleScan and ModelScan security scanners while achieving arbitrary code execution via joblib.load().
All three compression algorithms (zlib, bz2, lzma) result in scanner bypass.
Files
| File | Description |
|---|---|
poc_generator.py |
Generates 3 malicious compressed joblib files |
reproduce.sh |
One-command full reproduction |
poc_joblib_bypass_zlib.joblib |
zlib compressed, bypasses scanners, RCE on load |
poc_joblib_bypass_bz2.joblib |
bz2 compressed, bypasses scanners, RCE on load |
poc_joblib_bypass_lzma.joblib |
lzma compressed, bypasses scanners, RCE on load |
SUBMISSION.md |
Full vulnerability writeup |
Reproduction
bash reproduce.sh
This will install dependencies, generate PoC files, scan with both scanners (showing clean results), and then load with joblib to demonstrate code execution.
Affected Software
- PickleScan (mmaitre314/picklescan) - reports "0 infected", exit code 0
- ModelScan (protectai/modelscan) - reports "No issues found!"
Root Cause
Both scanners use pickletools.genops() which cannot parse compressed data. Compression headers are treated as unknown opcodes, errors are caught, and files are reported as clean.
Responsible Disclosure
This PoC is part of a responsible disclosure through the Huntr MFV program. Access is gated and restricted to authorized reviewers.
- Downloads last month
- 16