← All advisories
CVE-2026-46432highSupply chain2026-05-21

CVE-2026-46432: LMDeploy before 0.13.0 always loads models with trust_remote_code=True, so a malicious model repo runs code

LMDeploy before 0.13.0 hardcodes trust_remote_code=True when it calls Hugging Face Transformers to read a model's config, with no way to opt out. If someone can control the model path a server loads, for example through deployment config or a platform where users submit model IDs, pointing it at a malicious Hugging Face repo runs that repo's Python code in the serving process. Fixed in 0.13.0.

01.

What it is

lmdeploy/archs.py and lmdeploy/utils.py pass trust_remote_code=True to AutoConfig.from_pretrained(), PretrainedConfig.get_config_dict() and GenerationConfig.from_pretrained().

With that flag, Transformers may download and execute Python code shipped in the model repository during initialization.

The advisory confirmed lmdeploy 0.12.3 and earlier as affected. The first patched version is 0.13.0.

02.

How to check

  1. Run pip show lmdeploy and see whether the version is below 0.13.0.
  2. Check who can set the model path or model ID your LMDeploy servers load (CI/CD, Kubernetes config, user-submitted model IDs).
03.

How to fix

  1. Upgrade to LMDeploy 0.13.0 or later.
  2. Only serve models from repositories you trust, and pin them to a reviewed revision.
pip show lmdeploy | grep -i ^version
pip install -U 'lmdeploy>=0.13.0'
04.

Sources

More advisories for this tool
The weekly email

One email a week. Only what changed.

Every new security hole in AI coding tools, MCP servers, app builders and the stacks they generate (Next.js, Supabase, Node, PHP), each with how to check your app and the fix. No roundups of things you already read.

Free, one email a week. Read the latest issue first if you like. One-click unsubscribe in every email. We never sell or share addresses.