Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. lmdeploy
  4. ›
  5. CVE-2026-46432

CVE-2026-46432: LMDeploy: Arbitrary code execution via hardcoded trust_remote_code=True in lmdeploy model initialization

May 21, 2026 (updated June 10, 2026)

lmdeploy hardcodes trust_remote_code=True in multiple HuggingFace model-loading call sites.

The affected code paths are in:

lmdeploy/archs.py
lmdeploy/utils.py

The vulnerable call sites pass trust_remote_code=True into HuggingFace Transformers APIs such as AutoConfig.from_pretrained(), PretrainedConfig.get_config_dict(), and GenerationConfig.from_pretrained().

Because the model path is supplied by the operator or deployment configuration, an attacker who can control the model_path used by an lmdeploy serving process can point it to an attacker-controlled HuggingFace model repository. When lmdeploy starts and initializes the model, Transformers may download and execute remote Python code from that repository.

Successful exploitation results in arbitrary code execution with the privileges of the lmdeploy serving process.

References

  • github.com/InternLM/lmdeploy/pull/4511
  • github.com/InternLM/lmdeploy/security/advisories/GHSA-m549-qq94-fvhg
  • github.com/advisories/GHSA-m549-qq94-fvhg
  • nvd.nist.gov/vuln/detail/CVE-2026-46432

Code Behaviors & Features

Detect and mitigate CVE-2026-46432 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.13.0

Fixed versions

  • 0.13.0

Solution

Upgrade to version 0.13.0 or above.

Impact 7.8 HIGH

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

pypi/lmdeploy/CVE-2026-46432.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 23 Jun 2026 12:24:58 +0000.