Summary
A remote code execution vulnerability in vLLM's LlavaOnevision2 processor loader causes it to ignore the trust_remote_code setting when loading remote processor classes. A malicious model may therefore execute arbitrary code with the privileges of the vLLM process, even when remote code execution has been disabled by configuration.
Affected context
The vulnerability occurs in vLLM deployments that load models using the affected LlavaOnevision2 processor path. It becomes risky when a deployment processes a model from an untrusted or insufficiently vetted source and relies on trust_remote_code: false as a boundary against executable model-related code.
Exploit preconditions
- Attack surface: Model and processor loading within the vLLM runtime
- Required access: Ability to cause vLLM to load or process a malicious model
- Trigger point: Loading the LlavaOnevision2 remote processor class
- Why exploitation is possible: The loader fails to honor the configured trust restriction, allowing code supplied through the remote processor implementation to execute with vLLM process authority
Why this happens
The underlying bug is a trust-boundary failure in a dynamic component loader. Although the caller sets trust_remote_code to prevent execution of model-supplied Python code, the LlavaOnevision2 processor path does not consistently propagate or enforce that decision before loading the remote class. This maps to CWE-94: Improper Control of Generation of Code, because attacker-controlled model content can introduce executable code into a trusted application process.
Potential impact
- An attacker could execute arbitrary code in the vLLM process
- The compromise could expose model inputs, outputs, credentials, or local files
- The attacker could alter inference behavior or tamper with served models
- A compromised process could be used for lateral movement, subject to its runtime permissions
General mitigation guidance
Mitigation generally focuses on restoring a strict trust boundary around model-supplied code and reducing the authority of model-serving processes.
Common defensive patterns include:
- Enforcing the remote-code trust decision consistently across every processor and model-loading path
- Preferencing static, built-in processor implementations over dynamically loaded remote classes
- Allowing model loading only from authenticated, integrity-checked, and approved sources
- Running inference workers with least-privilege identities, restricted filesystem access, and limited network permissions
- Isolating untrusted model evaluation from production serving environments
- Treating configuration flags as enforceable security policies rather than advisory options
How teams detect issues like this
Organizations can look for this weakness through:
- Static analysis targeting dynamic imports, remote class loading, and code paths that bypass trust-control parameters
- Code review checks that trace security flags from public configuration through every loader and processor branch
- Tests that verify disabled remote-code settings prevent execution across all supported model architectures
- Policy enforcement requiring approved model registries, artifact integrity checks, and isolated evaluation environments
- Runtime monitoring for unexpected child processes, filesystem changes, outbound connections, or imports during model initialization
Automated code review and software composition analysis tools may help identify related loader and code-execution patterns.

