NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · vLLM

CVE-2026-114053: vLLM: Request-controlled mm_processor_kwargs.code_revision allows remote code execution

highCVSS 3.1 8.1GHSA-h3rc-6mm3-gc2m

vLLM lets a client set `mm_processor_kwargs.code_revision` in a multimodal request. On servers started with `--trust-remote-code`, that value picks which revision of the model's processor code Transformers imports, so an attacker who controls a revision can run Python in the vLLM server. Versions 0.7.3 up to but not including 0.31.0 are affected. Upgrade to 0.31.0.

Published Oct 27, 2026 · Analysis Oct 27, 2026

What an attacker can do

The request value travels from OnlineRenderer.preprocess_chat through MultiModalConfig.merge_mm_processor_kwargs, where request values override startup values. It then reaches AutoProcessor.from_pretrained with the operator's revision and trust_remote_code pinned, but code_revision is not reserved. Transformers uses code_revision to fetch and import the processor's dynamic module. Importing a module is code execution in the vLLM API or renderer process. The model data stays pinned to the operator's revision. Only the executed code changes.

The attacker needs several things at once. The model's processor must use dynamic auto_map.AutoProcessor code. The operator must have enabled trust_remote_code. The server must be able to fetch the chosen revision or have it cached. The attacker must control a revision in the served model repository, for example a Hugging Face community pull-request ref where the repository allows them. That is why the CVSS complexity is high.

The /tokenize endpoint also accepts mm_processor_kwargs. vLLM's authentication middleware guards only /v1, /v2, /inference and /cohere, so /tokenize stays open even with --api-key set, unless a proxy protects it. The default trust_remote_code=False is not affected.

Who is affected

vLLM from 0.7.3 up to but not including 0.31.0 is affected, and only when the server runs with --trust-remote-code and serves a model whose processor uses dynamic auto_map code. The advisory did not bisect the exact release range, and it was verified with Transformers 5.15.0 and 5.16.1.

Check the version:

pip show vllm

Then check your launch command or config for --trust-remote-code or trust_remote_code=True.

vllm

Ecosystem
PyPI
Affected
>= 0.7.3, < 0.31.0
Fixed in
0.31.0
Check
pip show vllm

How to fix it

Upgrade to vllm 0.31.0:

pip install --upgrade "vllm>=0.31.0"

The fix is pull request 58830. The advisory recommends that request mm_processor_kwargs reject loader and source controls such as code_revision, and that model_config.code_revision be the only processor-code revision. It also suggests protecting /tokenize with your auth policy.

Until you upgrade, turn off --trust-remote-code if the model does not need it, and put an authenticating proxy in front of /tokenize and the chat endpoints. The advisory does not list these as official workarounds. They follow from its attack conditions.

How to tell if you were hit

Look at request logs and any proxy logs for bodies to /tokenize or /v1/chat/completions that contain mm_processor_kwargs with a code_revision key. Normal clients rarely send it.

On the server, look for Hugging Face downloads of unexpected revisions, such as refs/pr/ refs, in the model cache and in outbound traffic. Check for new Python modules in the Transformers dynamic modules cache. Review child processes and file writes from the vLLM process.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

An untrusted multimodal request can set mm_processor_kwargs.code_revision. When vLLM serves a model whose Hugging Face processor uses dynamic auto_map code and the operator enabled --trust-remote-code, this request value reaches AutoProcessor.from_pretrained and selects the Python revision imported by Transformers.

This lets a client replace the operator-reviewed processor module with code from another revision of the same model repository. The operator-selected model/data revision remains pinned; only the executed processor code changes.

Importing a Python module is arbitrary code execution in the vLLM API/renderer process. The PoC below demonstrates this with an import-time filesystem write. It is fully offline and does not require a GPU, model weights, or changes to a real Hub repository.

Affected snapshot

Affected configuration

The vulnerable path exists when all of the following are true:

  1. The served model's processor uses dynamic auto_map.AutoProcessor code.
  2. The operator enabled trust_remote_code.
  3. The server can fetch the request-selected revision, or it is already cached.
  4. The attacker can create or otherwise control a revision in the served model repository. An example is a Hugging Face community pull-request ref when that repository permits them.
  5. A multimodal request reaches the processor path.

The default trust_remote_code=False configuration is not affected.

Attack surface

mm_processor_kwargs is accepted directly by public request models:

/tokenize is particularly relevant because vLLM's authentication middleware guards only /v1, /v2, /inference, and /cohere prefixes:

Consequently, /tokenize remains unauthenticated even when --api-key is configured, unless an external proxy protects it. The vLLM Security Guide documents /tokenize as an unprotected endpoint.

Root cause

The request value follows this path:

  1. `OnlineRenderer.preprocess_chat` places request mm_processor_kwargs in prompt extras.
  2. Multimodal rendering forwards those kwargs into processor construction through `MMProcessorInputs` and `_process_multimodal_async`.
  3. `MultiModalConfig.merge_mm_processor_kwargs` overlays inference values on startup values, so the request wins.
  4. `cached_get_processor_without_dynamic_kwargs` filters only recognized processor-call keys. code_revision is retained as a processor-construction kwarg.
  5. `cached_processor_from_config` pins revision and trust_remote_code, but forwards the remaining kwargs without reserving code_revision.
  6. `get_processor` calls AutoProcessor.from_pretrained(..., revision=revision, trust_remote_code=trust_remote_code, **kwargs).
  7. Transformers `AutoProcessor.from_pretrained` uses code_revision to retrieve and import the dynamic module through `get_class_from_dynamic_module`, then removes it before loading processor data. This is why code comes from the attacker revision while configuration/data remain operator-pinned.

Request-time processor arguments are not separated from processor-construction arguments, and code_revision is not reserved.

Suggested remediation

  1. Separate processor-construction arguments from untrusted processor-call arguments. An allowlist of supported request-time preprocessing controls is safest.
  2. Reject code_revision and other loader/source controls in request mm_processor_kwargs, and pass model_config.code_revision explicitly as the only permitted processor-code revision.
  3. Add a regression test proving a request cannot change the loaded module revision while operator pins remain effective.
  4. Protect /tokenize with the configured authentication policy as defense in depth.

Expected safe behavior is either a 4xx response for reserved request keys or silently ignoring them before processor construction. Rejection is preferable because it makes attempted misuse visible.

A patch for this was merged here: https://github.com/vllm-project/vllm/pull/58830

Credited to adithyan-ak, jperezdealgaba, DarkLight1337.

Questions

Is vLLM affected if I do not use --trust-remote-code?

No. The advisory says the default trust_remote_code=False configuration is not affected. The path needs trust_remote_code enabled and a processor that uses dynamic auto_map code.

Does setting --api-key protect against CVE-2026-114053?

Not fully. The /tokenize endpoint accepts mm_processor_kwargs and sits outside the auth middleware prefixes, so it stays unauthenticated unless an external proxy guards it.

What does the attacker need besides sending a request?

Control of a revision in the served model's repository, such as a community pull-request ref, that the server can fetch or has cached. The advisory also requires a multimodal request that reaches the processor path.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

Coverage on the Beam blog

More vLLM vulnerabilities

All vLLM entries