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
getFullPathmethod of langchain-ai/langchainjs version 0.2.5. This vulnerability allows attackers to save files anywhere in the filesystem, overwrite existing text files, read.txtfiles, and delete files. The vulnerability is exploited through thesetFileContent,getParsedFile, andmdeletemethods, which do not properly sanitize user input.References