langchain-ai langchainjs up to 0.2.18 getFullPath path traversal
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 7.5 | $0-$5k | 0.00 |
Summary
A vulnerability marked as critical has been reported in langchain-ai langchainjs up to 0.2.18. Affected is the function getFullPath. This manipulation causes path traversal.
This vulnerability is handled as CVE-2024-7774. The attack can be initiated remotely. There is not any exploit available.
It is suggested to upgrade the affected component.
Details
A vulnerability was found in langchain-ai langchainjs up to 0.2.18. It has been declared as critical. Affected by this vulnerability is the function getFullPath. The manipulation with an unknown input leads to a path traversal vulnerability. The CWE definition for the vulnerability is CWE-29. The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize '\..\filename' (leading backslash dot dot) sequences that can resolve to a location that is outside of that directory. As an impact it is known to affect confidentiality, integrity, and availability. The summary by CVE is:
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.
It is possible to read the advisory at huntr.com. This vulnerability is known as CVE-2024-7774 since 08/13/2024. The exploitation appears to be easy. The attack can be launched remotely. The exploitation doesn't need any form of authentication. Technical details of the vulnerability are known, but there is no available exploit. The attack technique deployed by this issue is T1006 according to MITRE ATT&CK.
Upgrading to version 0.2.19 eliminates this vulnerability. Applying the patch a0fad77d6b569e5872bd4a9d33be0c0785e538a9 is able to eliminate this problem. The bugfix is ready for download at github.com. The best possible mitigation is suggested to be upgrading to the latest version.
Be aware that VulDB is the high quality source for vulnerability data.
Product
Type
Vendor
Name
Version
- 0.2.0
- 0.2.1
- 0.2.2
- 0.2.3
- 0.2.4
- 0.2.5
- 0.2.6
- 0.2.7
- 0.2.8
- 0.2.9
- 0.2.10
- 0.2.11
- 0.2.12
- 0.2.13
- 0.2.14
- 0.2.15
- 0.2.16
- 0.2.17
- 0.2.18
License
Website
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 7.6VulDB Meta Temp Score: 7.5
VulDB Base Score: 7.3
VulDB Temp Score: 7.0
VulDB Vector: 🔍
VulDB Reliability: 🔍
NVD Base Score: 9.1
NVD Vector: 🔍
CNA Base Score: 6.5
CNA Vector (@huntr_ai): 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
Exploiting
Class: Path traversalCWE: CWE-29 / CWE-23 / CWE-22
CAPEC: 🔍
ATT&CK: 🔍
Physical: No
Local: No
Remote: Yes
Availability: 🔍
Status: Not defined
EPSS Score: 🔍
EPSS Percentile: 🔍
Price Prediction: 🔍
Current Price Estimation: 🔍
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔍
Upgrade: langchainjs 0.2.19
Patch: a0fad77d6b569e5872bd4a9d33be0c0785e538a9
Timeline
08/13/2024 🔍10/29/2024 🔍
10/29/2024 🔍
05/29/2025 🔍
Sources
Product: github.comAdvisory: huntr.com
Status: Confirmed
CVE: CVE-2024-7774 (🔍)
GCVE (CVE): GCVE-0-2024-7774
GCVE (VulDB): GCVE-100-282391
Entry
Created: 10/29/2024 14:50Updated: 05/29/2025 02:31
Changes: 10/29/2024 14:50 (66), 05/29/2025 02:31 (12)
Complete: 🔍
Cache ID: 216::103
Be aware that VulDB is the high quality source for vulnerability data.
No comments yet. Languages: en.
Please log in to comment.