Critical Remote Code Execution Vulnerability in lmcache Package
Summary
GHSA-vv44-hjm2-qw2f: Duplicate Advisory: Remote code execution via unsafe deserialization in multiprocess mode transport. Affects lmcache versions >= 0.3.9. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
lmcache is a Python package designed for managing a distributed key-value cache using ZeroMQ for communication between processes. It allows multiple worker processes to share cached data efficiently. However, due to its multiprocess mode, it is susceptible to vulnerabilities that can lead to unauthorized code execution, particularly when running in an unauthenticated state.
Vulnerability Detail
The vulnerability arises from the use of unsafe deserialization in lmcache's multiprocess mode, which opens an unauthenticated ZeroMQ ROUTER. This allows an attacker to send a specially crafted message to the transport port (default 5555), executing arbitrary code as the user running the lmcache process. Since official container images run this process as root, the implications of this vulnerability are severe, potentially allowing full system compromise.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary workaround, consider restricting access to the transport port (default 5555) by configuring your firewall to block external connections. Additionally, avoid running the lmcache process as root to minimize the risk of exploitation.
Conclusion
The lmcache package has a critical vulnerability that allows for remote code execution due to unsafe deserialization in its multiprocess mode. It is crucial to update to version 0.5.6 or later to mitigate this risk. Users should also consider using Vulert for real-time monitoring of vulnerabilities in their applications.
See every vulnerability recorded for lmcache →
FAQ
The CVSS score of this vulnerability is 9.8, indicating a critical level of risk.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. You can check your application using the Vulert playground without any signup at Vulert Scanner.
If exploited, this vulnerability can lead to remote code execution, allowing attackers to execute arbitrary code on the server, potentially leading to data breaches or system compromise.
Yes, version 0.5.6 and later of lmcache have addressed this vulnerability and are considered safe to use.
If an immediate update is not possible, implement a firewall rule to restrict access to the transport port and avoid running the lmcache process as root.
References
Related vulnerabilities
Recent vulnerabilities recorded for lmcache.