PT-2024-38570 · Langchain Ai · Langchainjs
Jacoblee93
·
Published
2024-10-29
·
Updated
2024-10-31
·
CVE-2024-7774
CVSS v3.1
9.1
Critical
| Vector | AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
Name of the Vulnerable Software and Affected Versions
langchain-ai/langchainjs version 0.2.5
Description
A path traversal issue exists in the
getFullPath method, allowing attackers to save files anywhere in the filesystem, overwrite existing text files, read .txt files, and delete files. The issue is exploited through the setFileContent, getParsedFile, and mdelete methods, which do not properly sanitize user input.Recommendations
For version 0.2.5, consider disabling the
getFullPath method, setFileContent, getParsedFile, and mdelete methods until a patch is available to prevent exploitation. Restrict access to these methods to minimize the risk of attackers saving, overwriting, reading, or deleting files. At the moment, there is no information about a newer version that contains a fix for this vulnerability.Exploit
Path traversal
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Langchainjs