Views
No views yet
trust_remote_code=True → RCE_load_language_model overlooked1# Local PoC (no HF repo upload needed)
2python exploit_demo.py --mode localattacker HF repo
→ cfg.pretrained_lm_name (config-controlled)
→ _load_language_model() [duplex_ear_tts.py:185]
→ HARDCODED trust_remote_code=True
→ load_pretrained_hf() [pretrained.py:35]
→ NO SANITIZATION / ALLOW-LIST
→ AutoModelForCausalLM.from_pretrained(..., trust_remote_code=True)
→ HuggingFace downloads config.json + modeling_*.py
→ importlib executes custom code on import
→ RCE| File | Description |
|---|---|
exploit_demo.py | PoC demonstration script |
malicious_repo/config.json | Malicious HF model config (auto_map + custom model_type) |
malicious_repo/modeling_duplex_eartts_rce.py | Malicious code — executes on import |
trust_remote_code=True → self.cfg.get("trust_remote_code", False) ✅_load_language_model: trust_remote_code=True → UNCHANGED ❌3dfe07c01dfe (July 14, 2026), no other commits have touched this file after PR #15650.