CVE-2024-7774

published 29 Oct 2024 · updated 29 Oct 2024

Path Traversal in langchain-ai/langchainjs

6.5MediumCVSS 6.5EPSS 1%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 1%. Fixed in 0.2.19.

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.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
langchain-ai<0.2.190.2.19

Timeline

Every event on this vulnerability

Embed

A live severity badge for an advisory, README or ticket

CVE-2024-7774 severity on Zeptric[![CVE-2024-7774](https://zeptric.io/badge/cve/CVE-2024-7774.svg)](https://zeptric.io/cve/CVE-2024-7774)