CVE-2024-7774
Path Traversal in langchain-ai/langchainjs
- State
- Published
- Severity
- 6.5 Medium
- Published
- Oct 29, 2024
- Updated
- Oct 29, 2024
- Reserved
- Aug 13, 2024
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.
Scores
| CVSS | Score | Vector | Source |
|---|---|---|---|
| 3.0 | 6.5 Medium | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N | @huntr_ai |
Weaknesses
- CWE-29 Path Traversal: '\..\filename'
Affected Products
| Product | Versions |
|---|---|
langchain-ai/langchainjslangchain-ai |
|
References
Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.