PT-2024-38570 · Langchain Ai · Langchainjs

·

CVE-2024-7774

·

Published

2024-10-29

·

Updated

2024-10-31

CVSS v4.0

6.9

Medium

VectorAV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA: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 👾

Weakness Enumeration

Related Identifiers

CVE-2024-7774
GHSA-HC5W-C9F8-9CC4

Affected Products

Langchainjs