Skip to main content

LMDeploy CVE-2026-33625

| EUVDEUVD-2026-83202 HIGH
Uncontrolled Resource Consumption (CWE-400)
2026-09-18 https://github.com/InternLM/lmdeploy GHSA-3hmm-rh5q-gwwr
8.8
CVSS 3.1 · Vendor: https://github.com/InternLM/lmdeploy
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Publish malicious model to HuggingFace Hub
  2. Delivery
    Victim loads model with lmdeploy
  3. Exploit
    quant_dtype reaches eval() unvalidated
  4. Execution
    Arbitrary Python executes on host
  5. Impact
    Full RCE in serving environment

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V2 - Validation and Business Logic Resource consumption limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the victim to load an attacker-controlled model whose HuggingFace quantization_config sets quant_method: awq (the AWQ branch does not override quant_dtype) with a malicious quant_dtype string that reaches eval(f'torch.{quant_dtype}') at lmdeploy/pytorch/config.py:620. Affected versions are lmdeploy >= 0.12.1 and < 0.12.3 (fixed in 0.12.3). The limiting factor is UI:R - the victim must actively load an untrusted model (e.g., lmdeploy serve pointed at a public/attacker-supplied model); the _update_torch_dtype whitelist at line 53 only guards torch_dtype, not quant_dtype, so no configuration hardening mitigates it short of avoiding untrusted models or upgrading.

Impact

This is a genuine high-priority vulnerability, not a high-CVSS-but-low-risk artifact. The vendor CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H, 8.8) is consistent with the described defect: an unauthenticated attacker publishes a model, and a victim triggers arbitrary Python execution simply by loading it. A working PoC is embedded in the GitHub Security Advisory (GHSA-3hmm-rh5q-gwwr) demonstrating os.system('id') executing as root, so exploitation is proven and trivially reproducible - 'publicly available exploit code exists.' No EPSS score, KEV listing, or SSVC decision data was provided in the input, so probability-of-exploitation and automatability cannot be quantified from the signals given; there is 'no public exploit identified' beyond the advisory PoC and no evidence of active in-the-wild exploitation. Note a data conflict: the CWE is labeled CWE-400 (Uncontrolled Resource Consumption / DoS), which is inconsistent with the description - this is unambiguously code injection (CWE-94/CWE-95) leading to RCE, not resource exhaustion. The one real limiter is UI:R: the victim must actively load an untrusted/attacker-supplied model, so risk concentrates in workflows that pull models from public hubs like HuggingFace rather than curated internal registries.

Exploit ScenarioDerived

An attacker publishes a malicious model on HuggingFace Hub whose config contains quantization_config.quant_method: awq and a crafted quant_dtype such as float16, __import__('os').system('id'). A victim running lmdeploy loads the model (e.g., via lmdeploy serve), and the AWQ branch passes the unvalidated value into eval(f'torch.{quant_dtype}') at config.py:620, executing the attacker's Python. A functional PoC exists in the vendor advisory showing code running as root.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 18, 2026

Arbitrary Python code execution in LMDeploy 0.12.1 through 0.12.2 lets an attacker who publishes a malicious model on HuggingFace Hub run code on any machine that loads it, because the model's quantization_config.quant_dtype string is interpolated into eval(f'torch.{quant_dtype}') at lmdeploy/pytorch/config.py:620 without any validation. The CVSS vector (AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H, 8.8) reflects that exploitation is remote and unauthenticated but requires the victim to actively load the attacker-supplied model, confirmed by our independent assessment that UI:R is the limiting factor and that the _update_torch_dtype whitelist at line 53 only guards torch_dtype, not quant_dtype. Publicly available proof-of-concept code exists in the vendor advisory (repo-level proof using a mocked HF config that yields uid=0(root)), but there is no confirmed actively exploited (CISA KEV) status, and no EPSS score was supplied; a fixed release, 0.12.3, is available.

RemediationAI

Vendor-released patch: upgrade to LMDeploy 0.12.3 (or later), the release that fixes CVE-2026-33625, using pip install -U lmdeploy==0.12.3 and rebuilding any container images that pin 0.12.1/0.12.2; confirm the pinned version in lockfiles and requirements constraints so the vulnerable range >= 0.12.1, < 0.12.3 is no longer resolved. See the advisory at https://github.com/InternLM/lmdeploy/security/advisories/GHSA-3hmm-rh5q-gwwr and release notes at https://github.com/InternLM/lmdeploy/releases/tag/v0.12.3. Because the flaw requires loading an attacker-controlled model and there is no configuration flag to sanitize quant_dtype in unpatched builds, the most effective compensating controls before upgrading are: only load models from vetted, internal mirrors with pinned revisions and audited config.json files (trade-off: loses convenience of pulling arbitrary Hub models and requires storage/provenance process), and reject any model whose quantization_config.quant_dtype is not a bare dtype token such as float16 or bfloat16 (this is a manual pre-flight check, not enforced by the library, and will not catch a malicious value embedded in a nested or renamed field). Additional containment: run model-loading and serving processes in a sandboxed container as a non-root user with a read-only root filesystem and dropped capabilities (the advisory PoC executed as root, so privilege reduction directly limits blast radius), apply outbound network egress restrictions on the serving host so any injected command cannot easily exfiltrate data or fetch second-stage payloads (trade-off: may break legitimate runtime downloads, telemetry, or tokenizer/model fetches unless allow-listed), and scan downloaded checkpoints for unexpected quantization_config fields before deployment. Note that the existing whitelist in _update_torch_dtype covers only torch_dtype, so it provides no protection for this vector; do not treat that control as a mitigation. No EPSS score or KEV listing is present in the supplied intelligence, so prioritization should be driven by exposure to untrusted model sources rather than observed exploitation.

Affected VersionsENISA

LMDeploy 0.12.1, < 0.12.3

Affected Packages

pypi lmdeploy fix: 0.12.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

LMDeploy is InternLM's PyTorch-based inference and serving toolkit (CPE pkg:pip/lmdeploy) for large language models distributed on HuggingFace Hub. When a model is loaded, ModelConfig.from_hf_config parses the model's quantization_config block; for quantized checkpoints the code resolves the quantization dtype by building a Python expression string and evaluating it - quant_dtype = eval(f'torch.{quant_dtype}') at line 620 of lmdeploy/pytorch/config.py. Because the torch. prefix does not constrain what follows, an attacker-supplied value such as "float16, __import__('os').system('id')" turns the expression into a tuple that executes arbitrary callables during parsing - a classic code-injection/eval-injection pattern (root cause class CWE-94, Improper Control of Generation of Code). The AWQ code path is important: when quant_method is awq, the branch processes the config but never overrides quant_dtype, so the malicious string is passed through untouched. LMDeploy already enforces a dtype whitelist in _update_torch_dtype (line 53), but that check applies only to torch_dtype; quant_dtype reaches the eval with no allow-list, no normalization, and no type check. The advisory's PoC mocks the HuggingFace config and demonstrates command execution, showing the flaw is reachable purely from a model's JSON metadata, i.e., a supply-chain attack on model artifacts rather than on a network service. Although the CWE recorded for this entry is CWE-400 (Uncontrolled Resource Consumption), the exploitation mechanism and vendor tags (RCE, Python) point squarely at code injection; CWE-400 does not describe the demonstrated behavior and should be treated as a labeling artifact rather than a resource-exhaustion issue, and the affected pipeline is local model loading, not HTTP request handling.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/InternLM/lmdeploy) PRIMARY 8.8 HIGH
AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 8.8 HIGH

Attacker needs no lmdeploy privileges to publish a model (PR:N), but the victim must actively load it (UI:R); eval() yields full RCE (C:H/I:H/A:H) within the process (S:U).

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/InternLM/lmdeploy).

CVSS VectorVendor: https://github.com/InternLM/lmdeploy

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch available
Sep 18, 2026 - 18:03 EUVD
CVE Published
Sep 18, 2026 - 17:04 github-advisory
HIGH 8.8

DescriptionCVE.org

Summary

lmdeploy <= latest contains a code injection vulnerability in lmdeploy/pytorch/config.py line 620 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 the model with lmdeploy, the quant_dtype is passed to eval(f'torch.{quant_dtype}') without any validation.

Details

Vulnerable code (permalink):

python
quant_dtype = eval(f'torch.{quant_dtype}')
# line 620

The quant_dtype value comes from the model's quantization_config in its HuggingFace config. When a model specifies quant_method: awq, the AWQ branch processes the config but does NOT override quant_dtype, allowing the malicious value to reach the eval() call.

Attack vector: An attacker publishes a HuggingFace model with:

json
{
  "quantization_config": {
    "quant_method": "awq",
    "quant_dtype": "float16, __import__('os').system('id')"
  }
}

Note: The _update_torch_dtype method at line 53 has a whitelist check, but that's for torch_dtype, NOT quant_dtype. The quant_dtype at line 620 has no validation whatsoever.

PoC

python
"""
PoC: eval() RCE in lmdeploy via malicious quant_dtype
Prerequisites: pip install lmdeploy
"""
import sys
from unittest.mock import MagicMock, patch
# Mock torch to capture the eval
sys.modules.setdefault('torch', MagicMock())

from lmdeploy.pytorch.config import ModelConfig
# Simulate a malicious HuggingFace model config
mock_hf_config = MagicMock()
mock_hf_config.quantization_config = {
    'quant_method': 'awq',
    'quant_dtype': "float16, __import__('os').system('id')"
}
mock_hf_config.num_attention_heads = 32
mock_hf_config.hidden_size = 4096
mock_hf_config.num_hidden_layers = 32
mock_hf_config.num_key_value_heads = 32
mock_hf_config.vocab_size = 32000
# This triggers eval(f'torch.{quant_dtype}')
# with quant_dtype = "float16, __import__('os').system('id')"
config = ModelConfig.from_hf_config(mock_hf_config, model_path='test')

Output:

uid=0(root) gid=0(root) groups=0(root)

Impact

An attacker who publishes a malicious model on HuggingFace Hub can achieve arbitrary code execution on any machine that loads the model with lmdeploy. This is a supply-chain attack vector affecting all lmdeploy users who load untrusted models.

  1. Full remote code execution when loading a malicious model
  2. No user interaction beyond running lmdeploy serve or similar with the model
  3. Affects all deployment scenarios (local, cloud, production)

Technical POC Analysis

The advisory classifies this as CWE-95 (Improper Neutralization of Directives in Dynamically Evaluated Code, "Eval Injection").

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

LMDeploy releases 0.12.1 and 0.12.2 allow arbitrary code execution on any host that loads a malicious model published to HuggingFace Hub, so teams using the library to serve, fine-tune, or evaluate third-party models can be fully compromised by a routine model download. The flaw is remotely reachable without authentication and requires only that a user load the attacker-supplied model, exposing data science, ML engineering, and production inference environments to high confidentiality, integrity, and availability loss. Leadership should treat this as a supply-chain risk to model ingestion workflows, not merely a library defect, because the trusted artifact itself becomes the attack vector.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 84% exploitable
Prevalence
Medium
popular open-source LLM inference/serving toolkit (InternLM), niche outside AI deployment
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

64
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy