CVE-2024-7774

Path Traversal in langchain-ai/langchainjs

Published Oct 29, 2024 CVSS 3.1 · 9.1 Critical EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

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
Type Values Removed Values Added
Metrics epss

{'score': 0.00272}

epss

{'score': 0.00338}

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
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'}

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'}

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'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
@huntr_ai
Published
Updated
Oct 29, 2024, 1:31 PM
Reserved
Aug 13, 2024, 9:13 PM
Status
Analyzed
Published
Oct 29, 2024, 1:15 PM
Modified
Jun 17, 2026, 8:20 AM