Critical severity · published Oct 29, 2024
CVE-2024-7774
Path Traversal in langchain-ai/langchainjs
9.1
CVSS
0.6%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
High
Integrity
High
Availability
None
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.6% · higher than 46% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
LA
langchain-ai/langchainjs · langchain-ai
before 0.2.19 · source: vendor
LA
Langchain.js · Langchain
0.2.5 · source: NVD
LA
Langchain-ai\/langchainjs · Langchain-ai
before 0.2.19 · source: CISA
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-7774
CVE.org
https://www.cve.org/CVERecord?id=CVE-2024-7774
Patch
https://github.com/langchain-ai/langchainjs/commit/a0fad77d6b569e5872bd4a9d33be0c0785e538a9
Exploit
https://huntr.com/bounties/8fe40685-b714-4191-af7a-3de5e5628cee
More from langchain-ai/langchainjs
9.8
CVE-2024-7042
Prompt Injection in langchain-ai/langchainjs Leading to SQL Injection
