Langchain Path Traversal vulnerability
Moderate severity
GitHub Reviewed
Published
Oct 29, 2024
to the GitHub Advisory Database
•
Updated Nov 1, 2024
Description
Published by the National Vulnerability Database
Oct 29, 2024
Published to the GitHub Advisory Database
Oct 29, 2024
Reviewed
Oct 29, 2024
Last updated
Nov 1, 2024
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 thesetFileContent
,getParsedFile
, andmdelete
methods, which do not properly sanitize user input.References