Junglewise Threat Intelligence

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

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

Executive brief

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.

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

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

Related threats