CVE-2024-7774: Path Traversal in langchain-ai/langchainjs
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 Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-7774?
The severity of CVE-2024-7774 is critical due to its potential for unauthorized file access and manipulation.
How do I fix CVE-2024-7774?
To fix CVE-2024-7774, upgrade to langchain version 0.2.19 or later.
What systems are affected by CVE-2024-7774?
CVE-2024-7774 affects langchain version 0.2.5 used in both pip and npm package installations.
What kind of attacks can be executed using CVE-2024-7774?
Attackers can exploit CVE-2024-7774 to save, read, overwrite, and delete files within the filesystem.
Is CVE-2024-7774 a zero-day vulnerability?
CVE-2024-7774 is not a zero-day vulnerability, as it has been disclosed with a known fix available.