Views
No views yet
trust_remote_code vulnerability in HuggingFace Transformers.trust_remote_code=True, this model writes a marker file to /tmp/trustremotecode.1from transformers import AutoConfig
2
3# This will execute code and write to /tmp/trustremotecode
4config = AutoConfig.from_pretrained("YOUR_USERNAME/trustremotecodepoc", trust_remote_code=True)
5
6# Verify the PoC worked
7import os
8if os.path.exists("/tmp/trustremotecode"):
9 print("PoC successful - arbitrary code executed!")trust_remote_code=True with untrusted models