Description
LMCache through 0.5.5 contains an unauthenticated remote code execution vulnerability that allows remote attackers to execute Python code by posting scripts to the /run_script endpoint. Attackers can recover real builtins through the injected FastAPI app object, bypassing the guarded __import__, to import os and run operating system commands as the LMCache process.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| LMCache | LMCache | ≤ 0.5.5 | — |
References
- GitHub Issue #5510 issue-tracking
- https://github.com/LMCache/LMCache product
- https://github.com/LMCache/LMCache/blob/v0.5.5/lmcache/v1/internal_api_server/common/run_script_api.py#L54-L76 technical-description
- https://github.com/LMCache/LMCache/blob/v0.5.5/lmcache/v1/multiprocess/http_apis/common_api.py#L41-L46 technical-description
- VulnCheck Advisory: LMCache through 0.5.5 Unauthenticated RCE via /run_script Endpoint third-party-advisory