wulonchia commited on
Commit
ef841bf
·
verified ·
1 Parent(s): 1228294

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +38 -0
README.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - security-research
5
+ - picklescan-bypass
6
+ ---
7
+
8
+ # Picklescan Scanner Bypass PoC — codecs.open LFI
9
+
10
+ ⚠️ **This is a security research PoC. Do NOT load untrusted model files.**
11
+
12
+ ## Summary
13
+
14
+ This repository demonstrates a bypass in [picklescan](https://github.com/protectai/picklescan) (v0.0.22), the scanner used by HuggingFace Hub to detect malicious pickle payloads in model files.
15
+
16
+ The file `picklescan-bypass-poc.joblib` contains a payload using `codecs.open("/etc/passwd", "r")` which:
17
+ - **Passes picklescan with 0 issues detected** (classified as "suspicious" not "dangerous")
18
+ - **Successfully reads /etc/passwd** when loaded via `joblib.load()`
19
+
20
+ ## Scan Result
21
+
22
+ ```
23
+ Issues: 0
24
+ Infected: 0
25
+ Globals: [Global(module='codecs', name='open', safety=<SafetyLevel.Suspicious>)]
26
+ ```
27
+
28
+ ## Affected Versions
29
+
30
+ - picklescan ≤ 0.0.22
31
+
32
+ ## Root Cause
33
+
34
+ `codecs.open` is not in picklescan's `_unsafe_globals` blocklist. It is only classified as `Suspicious`, which does NOT increment `issues_count` or `infected_files`, and does NOT block model loading.
35
+
36
+ ## Responsible Disclosure
37
+
38
+ This vulnerability has been reported via Huntr.com's Model File Vulnerability Program.