langchain-ai langchainjs up to 0.2.18 getFullPath path traversal

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
7.5$0-$5k0.00

Summaryinfo

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.

Detailsinfo

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.

Productinfo

Type

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 7.6
VulDB 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): 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

Exploitinginfo

Class: Path traversal
CWE: 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-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔍

Upgrade: langchainjs 0.2.19
Patch: a0fad77d6b569e5872bd4a9d33be0c0785e538a9

Timelineinfo

08/13/2024 🔍
10/29/2024 +77 days 🔍
10/29/2024 +0 days 🔍
05/29/2025 +212 days 🔍

Sourcesinfo

Product: github.com

Advisory: huntr.com
Status: Confirmed

CVE: CVE-2024-7774 (🔍)
GCVE (CVE): GCVE-0-2024-7774
GCVE (VulDB): GCVE-100-282391

Entryinfo

Created: 10/29/2024 14:50
Updated: 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.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Do you want to use VulDB in your project?

Use the official API to access entries easily!