<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0">
  <channel>
    <title>Most recent entries from all</title>
    <link>https://db.gcve.eu</link>
    <description>Contains only the most 10 recent entries.</description>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <generator>python-feedgen</generator>
    <language>en</language>
    <lastBuildDate>Wed, 30 Sep 2026 09:33:51 +0000</lastBuildDate>
    <item>
      <title>fkie_cve-2026-33625</title>
      <link>https://db.gcve.eu/vuln/fkie_cve-2026-33625</link>
      <description>&lt;p&gt;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&amp;#39;torch.{quant_dtype}&amp;#39;)` without any validation. Version 0.12.3 contains a patch.&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;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&amp;#39;torch.{quant_dtype}&amp;#39;)` without any validation. Version 0.12.3 contains a patch.&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://db.gcve.eu/vuln/fkie_cve-2026-33625</guid>
    </item>
    <item>
      <title>GHSA-3hmm-rh5q-gwwr — LMDeploy vulnerable to arbitrary code execution via eval() of untrusted quant_dtype in model config loading</title>
      <link>https://db.gcve.eu/vuln/ghsa-3hmm-rh5q-gwwr</link>
      <description>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; PyPI: lmdeploy&lt;/p&gt;
&lt;p&gt;### Summary&lt;/p&gt;
&lt;p&gt;lmdeploy &amp;lt;= 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&amp;#39;torch.{quant_dtype}&amp;#39;)` without any validation.&lt;/p&gt;
&lt;p&gt;### Details&lt;/p&gt;
&lt;p&gt;**Vulnerable code** ([permalink](https://github.com/InternLM/lmdeploy/blob/17ed9e5/lmdeploy/pytorch/config.py#L620)):&lt;/p&gt;
&lt;p&gt;```python
quant_dtype = eval(f&amp;#39;torch.{quant_dtype}&amp;#39;)  # line 620
```&lt;/p&gt;
&lt;p&gt;The `quant_dtype` value comes from the model&amp;#39;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.&lt;/p&gt;
&lt;p&gt;**Attack vector:** An attacker publishes a HuggingFace model with:
```json
{
  &amp;#34;quantization_config&amp;#34;: {
    &amp;#34;quant_method&amp;#34;: &amp;#34;awq&amp;#34;,
    &amp;#34;quant_dtype&amp;#34;: &amp;#34;float16, __import__(&amp;#39;os&amp;#39;).system(&amp;#39;id&amp;#39;)&amp;#34;
  }
}
```&lt;/p&gt;
&lt;p&gt;Note: The `_update_torch_dtype` method at line 53 has a whitelist check, but that&amp;#39;s for `torch_dtype`, NOT `quant_dtype`. The `quant_dtype` at line 620 has no validation whatsoever.&lt;/p&gt;
&lt;p&gt;### PoC&lt;/p&gt;
&lt;p&gt;```python
&amp;#34;&amp;#34;&amp;#34;
PoC: eval() RCE in lmdeploy via malicious quant_dtype
Prerequisites: pip install lmdeploy
&amp;#34;&amp;#34;&amp;#34;
import sys
from unittest.mock import MagicMock, patch&lt;/p&gt;
&lt;p&gt;# Mock torch to capture the eval
sys.modules.setdefault(&amp;#39;torch&amp;#39;, Magi…&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;&lt;strong&gt;Affected:&lt;/strong&gt; PyPI: lmdeploy&lt;/p&gt;
&lt;p&gt;### Summary&lt;/p&gt;
&lt;p&gt;lmdeploy &amp;lt;= 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&amp;#39;torch.{quant_dtype}&amp;#39;)` without any validation.&lt;/p&gt;
&lt;p&gt;### Details&lt;/p&gt;
&lt;p&gt;**Vulnerable code** ([permalink](https://github.com/InternLM/lmdeploy/blob/17ed9e5/lmdeploy/pytorch/config.py#L620)):&lt;/p&gt;
&lt;p&gt;```python
quant_dtype = eval(f&amp;#39;torch.{quant_dtype}&amp;#39;)  # line 620
```&lt;/p&gt;
&lt;p&gt;The `quant_dtype` value comes from the model&amp;#39;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.&lt;/p&gt;
&lt;p&gt;**Attack vector:** An attacker publishes a HuggingFace model with:
```json
{
  &amp;#34;quantization_config&amp;#34;: {
    &amp;#34;quant_method&amp;#34;: &amp;#34;awq&amp;#34;,
    &amp;#34;quant_dtype&amp;#34;: &amp;#34;float16, __import__(&amp;#39;os&amp;#39;).system(&amp;#39;id&amp;#39;)&amp;#34;
  }
}
```&lt;/p&gt;
&lt;p&gt;Note: The `_update_torch_dtype` method at line 53 has a whitelist check, but that&amp;#39;s for `torch_dtype`, NOT `quant_dtype`. The `quant_dtype` at line 620 has no validation whatsoever.&lt;/p&gt;
&lt;p&gt;### PoC&lt;/p&gt;
&lt;p&gt;```python
&amp;#34;&amp;#34;&amp;#34;
PoC: eval() RCE in lmdeploy via malicious quant_dtype
Prerequisites: pip install lmdeploy
&amp;#34;&amp;#34;&amp;#34;
import sys
from unittest.mock import MagicMock, patch&lt;/p&gt;
&lt;p&gt;# Mock torch to capture the eval
sys.modules.setdefault(&amp;#39;torch&amp;#39;, Magi…&lt;/p&gt;</content:encoded>
      <guid isPermaLink="false">https://db.gcve.eu/vuln/ghsa-3hmm-rh5q-gwwr</guid>
    </item>
  </channel>
</rss>
