LMDeploy vulnerable to arbitrary code execution via eval() of untrusted quant_dtype in model config loading
LMDeploy is a toolkit for compressing, deploying, and serving large language models. Versions 012.1 through 0.12.2 contain 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. Version 0.12.3 contains a patch.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-33625
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 13:55 UTC · Revision 1
Source evidence
LMDeploy vulnerable to arbitrary code execution via eval() of untrusted quant_dtype in model config loading
core-osv · Original sourcePublished 18 Sept 2026, 17:13 UTC
LMDeploy is a toolkit for compressing, deploying, and serving large language models. Versions 012.1 through 0.12.2 contain 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. Version 0.12.3 contains a patch.
osv:CVE-2026-33625
Complete source record
{
"id": "2d4048825c0eb843ff2f22bf69dbea553d320d70d9b1661232d3d6def0f3f8bf",
"url": "https://osv.dev/vulnerability/CVE-2026-33625",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "LMDeploy vulnerable to arbitrary code execution via eval() of untrusted quant_dtype in model config loading",
"summary": "LMDeploy is a toolkit for compressing, deploying, and serving large language models. Versions 012.1 through 0.12.2 contain 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. Version 0.12.3 contains a patch.",
"evidence": "osv:CVE-2026-33625",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2026-33625",
"aliases": [
"CVE-2026-33625",
"GHSA-3hmm-rh5q-gwwr",
"PYSEC-2026-4078"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/internlm/lmdeploy",
"type": "GIT",
"events": [
{
"introduced": "e5df4e8336cd44a1c6e3e358ebd8c9b246932d99"
},
{
"fixed": "8ea459f49ed9cd943481073011424919e31e3e3b"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0.12.1"
},
{
"fixed": "0.12.3"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"fixed": "8ea459f49ed9cd943481073011424919e31e3e3b"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v0.12.3"
}
]
}
}
],
"versions": [
"v0.12.2",
"v0.12.1"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-33625.json"
}
}
],
"modified": "2026-10-28T02:30:35.832234880Z",
"provider": "osv",
"references": [
"https://github.com/InternLM/lmdeploy/releases/tag/v0.12.3",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/33xxx/CVE-2026-33625.json",
"https://github.com/InternLM/lmdeploy/security/advisories/GHSA-3hmm-rh5q-gwwr",
"https://nvd.nist.gov/vuln/detail/CVE-2026-33625"
],
"provider_metadata": {
"cwe_ids": [
"CWE-400"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/33xxx/CVE-2026-33625.json"
}
},
"related_cves": [
{
"value": "CVE-2026-33625",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 503351,
"published_at": "2026-09-18T17:13:37.133+00:00"
}