Update README to document .joblib coverage via extension routing
Browse files
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
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
- `
|
| 16 |
-
- `
|
| 17 |
-
|
| 18 |
-
- `
|
| 19 |
-
|
| 20 |
-
**These
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 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`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|