Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
The probability is the direct output of the EPSS model, and conveys an overall sense of the threat of exploitation in the wild. The percentile measures the EPSS probability relative to all known EPSS scores. Note: This data is updated daily, relying on the latest available EPSS model version. Check out the EPSS documentation for more details.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsUpgrade langchain
to version 0.0.353 or higher.
langchain is a Building applications with LLMs through composability
Affected versions of this package are vulnerable to Path Traversal due to improper limitation of a pathname to a restricted directory in its LocalFileStore
functionality. An attacker can leverage this vulnerability to read or write files anywhere on the filesystem, potentially leading to information disclosure or remote code execution.
Note:
The issue lies in the handling of file paths in the mset
and mget
methods, where user-supplied input is not adequately sanitized, allowing directory traversal sequences to reach unintended directories.
from langchain.storage import LocalFileStore
file_store = LocalFileStore("/home")
value = file_store.mget(["/etc/passwd"])
print(value)