CVE-2024-7774 – langchain
Package
Manager: npm
Name: langchain
Vulnerable Version: >=0 <0.2.19
Severity
Level: Medium
CVSS v3.1: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N
EPSS: 0.00479 pctl0.64111
Details
Langchain Path Traversal vulnerability 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.
Metadata
Created: 2024-10-29T15:32:05Z
Modified: 2024-11-01T15:24:38Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/10/GHSA-hc5w-c9f8-9cc4/GHSA-hc5w-c9f8-9cc4.json
CWE IDs: ["CWE-22", "CWE-29"]
Alternative ID: GHSA-hc5w-c9f8-9cc4
Finding: F063
Auto approve: 1