CVE-2026-46432: LMDeploy: Arbitrary code execution via hardcoded trust_remote_code=True in lmdeploy model initialization
(updated )
lmdeploy hardcodes trust_remote_code=True in multiple HuggingFace model-loading call sites.
The affected code paths are in:
lmdeploy/archs.py
lmdeploy/utils.py
The vulnerable call sites pass trust_remote_code=True into HuggingFace Transformers APIs such as AutoConfig.from_pretrained(), PretrainedConfig.get_config_dict(), and GenerationConfig.from_pretrained().
Because the model path is supplied by the operator or deployment configuration, an attacker who can control the model_path used by an lmdeploy serving process can point it to an attacker-controlled HuggingFace model repository. When lmdeploy starts and initializes the model, Transformers may download and execute remote Python code from that repository.
Successful exploitation results in arbitrary code execution with the privileges of the lmdeploy serving process.
References
Code Behaviors & Features
Detect and mitigate CVE-2026-46432 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →