# CVE-2026-46517: InternLM LMDeploy remote code execution via hardcoded trust_remote_code

Source: https://junglewise.ai/threats/cve-2026-46517-internlm-lmdeploy-remote-code-execution-via-hardcoded-trust  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-10. Updated: 2026-06-10  
License: CC BY 4.0 with a link back

CVE-2026-46517 · Severity: high · CVSS 7.8 · Published 2026-06-10

LMDeploy, a toolkit for deploying large language models, contains a security flaw that automatically executes code bundled with AI models without asking for user permission. If a user attempts to load or serve a malicious model from a repository like Hugging Face, the software will automatically run any scripts hidden within that model's configuration. This could allow an attacker to take full control of the user's system, steal data, or disrupt operations simply by tricking a user into loading a specific model name.

Technologies: [lmdeploy (PyPI)](https://junglewise.ai/threats/technologies/lmdeploy). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-46517 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-46517 being exploited in the wild.

**How severe is CVE-2026-46517?** High severity, with a CVSS score of 7.8, published 10 June 2026.

**Which products and versions are affected?** lmdeploy (PyPI) <= 0.12.3, ECOSYSTEM:introduced=0,fixed=0.13.0, ECOSYSTEM:introduced=0,last_affected=0.12.3.

**Is there a fix for CVE-2026-46517?** Yes. lmdeploy (PyPI): upgrade to 0.13.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-46517 attacked?** It is attacked with local access, in a software library.

**Am I affected by CVE-2026-46517?** Check whether you run lmdeploy (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- lmdeploy (PyPI): upgrade to 0.13.0 or later

  ```sh
  pip install "lmdeploy>=0.13.0"
  ```


## Technical details

LMDeploy (versions <= 0.12.3) hardcodes the 'trust_remote_code=True' parameter in several critical model-loading components, including 'archs.py' and 'calibrate.py'. This bypasses the default-secure stance of the Hugging Face Transformers library, which requires explicit user consent to execute remote code. When a user provides a model path or repository ID, LMDeploy calls 'AutoConfig.from_pretrained' with this hardcoded flag, causing the library to download and execute arbitrary Python code defined in the repository's 'configuration_*.py' file via 'importlib'. An attacker can achieve full code execution in the context of the LMDeploy process user by tricking a user into loading a malicious model. As of the advisory date, no official patch is available.

## Affected products

- InternLM LMDeploy <= 0.12.3

## Identifiers

- CVE-2026-46517
- GHSA-9xq9-36w5-q796
- PYSEC-2026-2608

## Timeline

- 2026-05-02: other: Vulnerability identified and reframed by researchers
- 2026-05-15: advisory: GitHub Security Advisory published
- 2026-06-10: disclosed: CVE published to NVD

## References

- [https://github.com/InternLM/lmdeploy/security/advisories/GHSA-9xq9-36w5-q796](https://github.com/InternLM/lmdeploy/security/advisories/GHSA-9xq9-36w5-q796)

## Related threats

- [LMDeploy arbitrary code execution via eval() of untrusted quant_dtype](https://junglewise.ai/threats/cve-2026-33625-lmdeploy-arbitrary-code-execution-via-eval-of-untrusted-quant)
- [LMDeploy remote code execution via pickle deserialization in DistServe](https://junglewise.ai/threats/cve-2025-66455-lmdeploy-remote-code-execution-via-pickle-deserialization-in)
- [LMDeploy SSRF bypass in URL validation](https://junglewise.ai/threats/lmdeploy-ssrf-bypass-in-url-validation-c4a40a8d)
- [LMdeploy remote code execution via pickle deserialization in zmq_rpc](https://junglewise.ai/threats/cve-2025-59953-lmdeploy-remote-code-execution-via-pickle-deserialization-in-zmq)
- [PYSEC-2026-1579 - InternLM LMDeploy code injection vulnerability](https://junglewise.ai/threats/cve-2025-3163-internlm-lmdeploy-code-injection-vulnerability)
