chat_gradio_no_merge.py 根据 adapter 配置重定向基础模型,并以硬编码方式加载 trust_remote_code=True
作者: 3em0创建于 2026年10月1日更新于 2026年10月1日
- Model tampering: The adapter has obtained the ability to decide which base model and custom modeling code to load, which goes beyond the semantics of a LoRA package (LoRA should only describe the weight increments).
- Supply chain redirection: The attacker can publish a seemingly harmless adapter (which can be distributed on platforms such as Hugging Face), and induce the user to run the entry, which allows the victim process to load models and custom code from the attacker's specified source; in environments without GPUs, this report only observes code requests, and in the final repository with the necessary conditions, any custom modeling code will be imported and executed (this report does not deliver or include this stage).
- Both the tokenizer and the base model can be replaced, affecting the integrity and reliability of inference services.
- Suggested fix: CVSS v3.1: CVSS: 3.1/AV: N/AC: L/PR: N/UI: R/S: U/C: H/I: H/A: H = 8.8 (High); the score assumes that the second repository can execute the modeling .py when it is delivered, and this report stops at the boundary of "code request/analysis".
内容来源: LlamaChinese/Llama-Chinese