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.
Published: 2024-10-29
Score: 9.1 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Analysis and contextual insights are available on OpenCVE Cloud.

Remediation

No vendor fix or workaround currently provided.

Additional remediation guidance may be available on OpenCVE Cloud.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
EUVD EUVD EUVD-2024-0091 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.
Github GHSA Github GHSA GHSA-hc5w-c9f8-9cc4 Langchain Path Traversal vulnerability
History

Tue, 15 Jul 2025 13:45:00 +0000

Type Values Removed Values Added
Metrics epss

{'score': 0.00272}

epss

{'score': 0.00338}


Wed, 28 May 2025 15:45:00 +0000

Type Values Removed Values Added
First Time appeared Langchain langchain.js
CPEs cpe:2.3:a:langchain:langchain:0.2.5:*:*:*:*:*:*:* cpe:2.3:a:langchain:langchain.js:0.2.5:*:*:*:*:*:*:*
Vendors & Products Langchain langchain
Langchain langchain.js

Thu, 31 Oct 2024 16:00:00 +0000

Type Values Removed Values Added
First Time appeared Langchain
Langchain langchain
Weaknesses CWE-22
CPEs cpe:2.3:a:langchain:langchain:0.2.5:*:*:*:*:*:*:*
Vendors & Products Langchain
Langchain langchain
Metrics cvssV3_1

{'score': 9.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N'}


Tue, 29 Oct 2024 14:15:00 +0000

Type Values Removed Values Added
First Time appeared Langchain-ai
Langchain-ai langchain-ai\/langchainjs
CPEs cpe:2.3:a:langchain-ai:langchain-ai\/langchainjs:*:*:*:*:*:*:*:*
Vendors & Products Langchain-ai
Langchain-ai langchain-ai\/langchainjs
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 29 Oct 2024 13:15:00 +0000

Type Values Removed Values Added
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.
Title Path Traversal in langchain-ai/langchainjs
Weaknesses CWE-29
References
Metrics cvssV3_0

{'score': 6.5, 'vector': 'CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N'}


Subscriptions

Langchain Langchain.js
Langchain-ai Langchain-ai\/langchainjs
cve-icon MITRE

Status: PUBLISHED

Assigner: @huntr_ai

Published:

Updated: 2024-10-29T13:31:38.566Z

Reserved: 2024-08-13T21:13:38.960Z

Link: CVE-2024-7774

cve-icon Vulnrichment

Updated: 2024-10-29T13:31:28.791Z

cve-icon NVD

Status : Analyzed

Published: 2024-10-29T13:15:09.930

Modified: 2025-05-28T15:21:32.300

Link: CVE-2024-7774

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

No data.

Weaknesses