CVE-2024-7774
langchain.js vulnerability - langchain
Description
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 Systems
| Vendor | langchain |
| Product | langchain.js |
| Affected Versions | 0.2.5 |
| CWE ID | CWE-29 |
Mitigation
Apply the latest security patches from the vendor, restrict network exposure where applicable, and monitor for exploitation attempts.
Fix Instructions
Refer to the vendor advisory and apply the latest security updates. See references for detailed patching instructions.
References
Risk Assessment
CVSS: 9.1/10
| Exploit Available | Unknown |
| Patch Available | Yes |
Need Help Patching?
Our security team can help assess and remediate this vulnerability in your environment.
Get HelpRelated Vulnerabilities
Stay Ahead of Threats
Subscribe to our vulnerability feed and get instant alerts when new CVEs affect your systems.
Start Monitoring