{"id":"CVE-2024-7774","published":"2024-10-29T12:49:21Z","modified":"2024-10-29T13:31:38Z","title":"Path Traversal in langchain-ai/langchainjs","vendor":"langchain-ai","product":"langchain-ai/langchainjs","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00557,"percentile":0.47329,"provenance":"source"},"cwes":[{"id":"CWE-29","name":"Path Traversal: '..filename'"}],"references":[{"url":"https://huntr.com/bounties/8fe40685-b714-4191-af7a-3de5e5628cee","tags":[]},{"url":"https://github.com/langchain-ai/langchainjs/commit/a0fad77d6b569e5872bd4a9d33be0c0785e538a9","tags":[]}],"priority":{"score":14.0,"factors":[{"name":"EPSS percentile","points":9.47},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"langchain-ai","affectedVersions":[{"vendor":"langchain-ai","product":"langchain-ai/langchainjs","versions":[">= unspecified, < 0.2.19"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2024-10-29T13:28:45.771600Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"langchain","vulnerableRanges":["<0.2.19"],"patched":["0.2.19"],"from":["GHSA-hc5w-c9f8-9cc4"],"provenance":"source"}],"summary":{"text":"A path traversal flaw exists in the getFullPath method of the langchain-ai/langchainjs product (version 0.2.5), which the setFileContent, getParsedFile, and mdelete methods rely on without properly sanitising user input. An unauthenticated remote attacker with no user interaction and default configuration can save files anywhere on the filesystem, overwrite existing text files, read .txt files, and delete files.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:39:38Z"},"euvd":{"id":"EUVD-2024-0091","exploited":false,"provenance":"source"}}