github.com
https://github.com/langchain-ai/langchainjs CVE-2024-7774
Path Traversal in langchain-ai/langchainjs
Description
A path traversal vulnerability exists in the `getFullPath` method of langchain-ai/langchainjs version 0.2.5. This vulnerability allows attackers to save files anywhere in the filesystem, overwrite existing text files, read `.txt` files, and delete files. The vulnerability is exploited through the `setFileContent`, `getParsedFile`, and `mdelete` methods, which do not properly sanitize user input.
Description source: CVE List
Exploitation context
CISA SSVC decision
ExploitationPoC
AutomatableNo
Technical impactPartial
CISA Coordinator · SSVC 2.0.3 · Evaluated Oct 29, 2024 · Source: CVE List
Affected products and versions
2| Product | Source | Version range | Status |
|---|---|---|---|
langchain-ai\/langchainjsBrowse langchain-ai / langchain-ai/langchainjsDefault status: unknown | CVE List | Before 0.2.19 | affected |
langchainBrowse npm / langchain | GitHub Advisory | Before 0.2.19 · Fixed in 0.2.19 | affected |
References
5github.com
https://github.com/langchain-ai/langchainjs/commit/a0fad77d6b569e5872bd4a9d33be0c0785e538a9 github.com
https://github.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2024-111.yaml huntr.com
https://huntr.com/bounties/8fe40685-b714-4191-af7a-3de5e5628cee nvd.nist.gov
https://nvd.nist.gov/vuln/detail/CVE-2024-7774