Downloads · 30 days
0
kais113/joblib-zf-scanner-bypass-poc
joblib-zf-scanner-bypass-poc is a machine learning model from kais113. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This repository contains a proof-of-concept malicious .joblib payload for a responsible-disclosure bug bounty submission filed at huntr.com under the Model File Formats program.
Downloads · 30 days
0
Access
Public
Updated May 19, 2026
Repo size
101 B
Likes
0
Public
Click a slice to open those files.
.md4.1 KB · 44%
From the Hugging Face model README
This repository contains a proof-of-concept malicious .joblib payload for a responsible-disclosure bug bounty submission filed at huntr.com under the Model File Formats program.
The PoC demonstrates a scanner-bypass primitive: a .joblib file that:
infected_files=0, issues_count=0) by every major pickle scanner (picklescan 1.0.4, modelscan, fickling)joblib.load() — invokes nt.system("echo PoC") / os.system("echo PoC") on unpickle (intentionally inert payload — only prints a banner)The bypass works because joblib.load() routes files whose first two bytes are b"ZF" into a legacy compatibility container at joblib/numpy_pickle_compat.py::read_zfile (present since 2015, current main HEAD). The wrapper format is not documented to any third-party scanner — scanners see a non-pickle blob and return clean.
# DO NOT RUN THIS
import joblib
joblib.load("zf_wrapped.joblib") # ← invokes nt.system / os.system
The payload is intentionally inert (just an echo), but the demonstration is that scanners cannot tell the difference between this and a destructive payload.
| File | Purpose | Scanner verdict |
|---|---|---|
plain.pkl | Control — same payload as a plain pickle | picklescan: infected_files=1 (CAUGHT — denylist working) |
zf_wrapped.joblib | The bypass — same payload wrapped in joblib ZF format | picklescan: infected_files=0 (BYPASSED — scanner blind) |
build_and_scan.py | Reproducer — rebuilds both files locally and re-runs picklescan | — |
pip install picklescan==1.0.4 joblib
python build_and_scan.py
Expected output:
--- PLAIN pickle (.pkl): plain.pkl ---
infected_files : 1
issues_count : 1
global : nt.system (safety=Dangerous) ← CAUGHT
--- ZF-wrapped (.joblib): zf_wrapped.joblib ---
infected_files : 0
issues_count : 0
globals : NONE ← BYPASSED SILENTLY
read_zfile path is in current main)b"ZF" magic)This PoC is part of a responsible-disclosure submission filed via huntr's bug bounty program. The submission proposes fixes including:
After triage and remediation, this repository will be either marked private or deleted.
This is one of multiple orthogonal .joblib scanner-bypass primitives I've identified:
compress= wrappers (gzip/bz2/lzma/xz/zlib) — separate filing_io.open, __import__) — separate filingnumpy.testing, http.client) — separate filingEach requires an independent fix.
Security researcher: kais113 ([email protected]) huntr profile: huntr.com/users/kais113 (once profile is public)
This repository is intended for security research and responsible disclosure only. Do not use the techniques shown here on systems you do not own or have permission to test. The author assumes no liability for misuse.