CVE-2024-7774
published medium CVSS 3.0 · 6.5Path Traversal in langchain-ai/langchainjs
Package status and fixes
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.0
- Base score
- 6.5 / 10
- Severity
- medium
- Provider
- @huntr_ai · cna
- Vector string
- CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| langchain-ai | langchain-ai/langchainjs | unspecified to < 0.2.19 (affected · custom) | @huntr_ai · cna |
| langchain-ai | langchain-ai\/langchainjs | 0 to < 0.2.19 (affected · custom)Default: unknown | CISA-ADP · adp |
Weaknesses
1- CWE-29 CWE-29 Path Traversal: '\..\filename'
References
2Provider assertions
2@huntr_ai · cna
Path Traversal in langchain-ai/langchainjs
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 1897bdd6b73edddf6d783366e7ecc092fe304521cbaf23a84c9497c9c21d9275
- Ingested
- 23 Sep 2026, 08:33:51 UTC
- Source record
- Official CVE record