Summary
CVE-2026-107204 is a critical unauthenticated remote code execution vulnerability in LMCache, an open-source KV-cache acceleration layer used with LLM inference engines such as vLLM. The flaw resides in the /run_script endpoint of LMCache’s internal API server, which lets remote, unauthenticated attackers submit Python scripts that escape the server’s sandboxing and execute arbitrary operating system commands. The issue affects all LMCache releases through 0.5.5 and carries a CVSS v3.1 base score of 9.8 (Critical), with no official patch currently available.
Technical details
- Root cause: The
/run_scriptendpoint executes attacker-supplied Python code inside a restricted "sandbox" that limits built-in functions and guards the__import__call. However, the sandbox’s global namespace includes the live FastAPIappobject. By walking object attributes (e.g.,app.__init__.__globals__['__builtins__']), an attacker can recover the real, unrestricted Python builtins. - Trigger conditions: The internal/admin API server must be enabled and reachable — it binds to
0.0.0.0by default in vulnerable versions, exposing the endpoint on the network without any authentication requirement. - Attack vector: An unauthenticated remote attacker sends an HTTP
POSTrequest to/run_scriptcontaining a crafted Python script that reconstructs the real builtins object, importsos, and runs arbitrary OS commands as the LMCache process user. - Impact: Full compromise of confidentiality, integrity, and availability of the host running LMCache — arbitrary code execution, data theft (including cached model KV data), and potential lateral movement within the hosting environment.
Affected software
- LMCache (PyPI package
lmcache), all versions through 0.5.5 - Vulnerable code paths:
lmcache/v1/internal_api_server/common/run_script_api.pylmcache/v1/multiprocess/http_apis/common_api.py
Severity
- CVSS v3.1 Base Score: 9.8 (Critical)
- Vector:
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - (A CVSS v4.0 score of 9.3, Critical, is also recorded for this CVE.)
- CWE-306: Missing Authentication for Critical Function
Mitigation and recommended actions
- Immediate: As of publication, no patched LMCache release fully resolves this sandbox-escape issue. Organizations should track the official LMCache repository and apply a fixed version as soon as one is released.
- Workarounds / network mitigations (until a patch is available):
- Disable the internal/admin API server (including the
run_scriptfeature) wherever it is not strictly required. - Restrict network exposure of the LMCache admin/internal API port — bind it to
localhostonly, or block external access via firewall/security group rules so it is never reachable from untrusted networks. - Place any required access to the internal API server behind strong network-layer authentication (e.g., VPN, mutual TLS, or an authenticating reverse proxy), since the endpoint itself performs no authentication.
- Monitor LMCache server logs and network traffic for unexpected
POST /run_scriptrequests.
- Disable the internal/admin API server (including the

