askeladd-k commited on
Commit
9bf316f
·
verified ·
1 Parent(s): 8d893be

Update README to document .joblib coverage via extension routing

Browse files
Files changed (1) hide show
  1. README.md +49 -55
README.md CHANGED
@@ -1,55 +1,49 @@
1
- ---
2
- license: cc-by-4.0
3
- tags:
4
- - security
5
- - poc
6
- - modelscan
7
- ---
8
-
9
- # ModelScan v0.8.8 additional unsafe_globals primitives
10
-
11
- Proof-of-concept pickle files demonstrating that ModelScan's `unsafe_globals`
12
- allowlist omits four additional code-execution primitives beyond those already
13
- disclosed in issues #338, #331, and PR #339 on `protectai/modelscan`:
14
-
15
- - `operator.methodcaller`
16
- - `functools.partial`
17
- - `atexit.register`
18
- - `threading.Thread`
19
-
20
- **These pickle files are intentionally malicious for demonstration purposes.**
21
- Do not load any of them on a system you care about. Each file contains a
22
- minimal `__reduce__`-shaped payload referencing one of the four primitives.
23
-
24
- See the huntr submission for the detailed Description.
25
-
26
- ## Reproduction
27
-
28
- ```bash
29
- python -m venv venv
30
- # Windows:
31
- . venv/Scripts/activate
32
- # POSIX:
33
- . venv/bin/activate
34
-
35
- pip install modelscan==0.8.8
36
- git clone https://huggingface.co/askeladd-k/modelscan-additional-primitives poc
37
- cd poc
38
- python repro.py
39
- ```
40
-
41
- ### Expected output
42
-
43
- ```
44
- R2_A1-02_methodcaller.pkl: total_issues=0 [BYPASSED (gap)]
45
- R2_A1-05_partial.pkl: total_issues=0 [BYPASSED (gap)]
46
- R2_A1-07_atexit.pkl: total_issues=0 [BYPASSED (gap)]
47
- R2_A1-09_threading.pkl: total_issues=0 [BYPASSED (gap)]
48
- positive_control.pkl: total_issues=1 [FLAGGED (positive control)]
49
- ```
50
-
51
- ## AI disclosure
52
-
53
- These proof-of-concept files were generated with AI-assisted analysis and
54
- manually verified in a clean environment against vanilla
55
- `pip install modelscan==0.8.8`.
 
1
+ ---
2
+ license: cc-by-4.0
3
+ tags:
4
+ - security
5
+ - poc
6
+ - modelscan
7
+ ---
8
+
9
+ # ModelScan v0.8.8 additional unsafe_globals primitives
10
+
11
+ Proof-of-concept files demonstrating that ModelScan's `unsafe_globals` allowlist omits four additional code-execution primitives beyond those already disclosed in issues #338, #331, and PR #339 on `protectai/modelscan`:
12
+
13
+ - `operator.methodcaller`
14
+ - `functools.partial`
15
+ - `atexit.register`
16
+ - `threading.Thread`
17
+
18
+ The bypass affects every extension `PickleUnsafeOpScan` is dispatched to via `FormatViaExtensionMiddleware`: `.pkl`, `.pickle`, `.joblib`, `.dill`, `.dat`, `.data`. A `.joblib` variant (`R2_A1-09_threading.joblib`) is included as concrete demonstration that the `.joblib` extension routes to the same scanner and yields the same `total_issues: 0` result.
19
+
20
+ **These files are intentionally malicious for demonstration purposes.** Do not load any of them on a system you care about.
21
+
22
+ See the huntr submission for the detailed Description.
23
+
24
+ ## Reproduction
25
+
26
+ ```bash
27
+ python -m venv venv
28
+ # Windows: . venv/Scripts/activate
29
+ # POSIX: . venv/bin/activate
30
+ pip install modelscan==0.8.8
31
+ git clone https://huggingface.co/askeladd-k/modelscan-additional-primitives poc
32
+ cd poc
33
+ python repro.py
34
+ ```
35
+
36
+ ### Expected output
37
+
38
+ ```
39
+ R2_A1-02_methodcaller.pkl: total_issues=0 [BYPASSED (gap)]
40
+ R2_A1-05_partial.pkl: total_issues=0 [BYPASSED (gap)]
41
+ R2_A1-07_atexit.pkl: total_issues=0 [BYPASSED (gap)]
42
+ R2_A1-09_threading.pkl: total_issues=0 [BYPASSED (gap)]
43
+ R2_A1-09_threading.joblib: total_issues=0 [BYPASSED (gap, .joblib variant)]
44
+ positive_control.pkl: total_issues=1 [FLAGGED (positive control)]
45
+ ```
46
+
47
+ ## AI disclosure
48
+
49
+ These proof-of-concept files were generated with AI-assisted analysis and manually verified in a clean environment against vanilla `pip install modelscan==0.8.8`.