Lucene search

K
githubGitHub Advisory DatabaseGHSA-RGP8-PM28-3759
HistoryApr 16, 2024 - 12:30 a.m.

langchain vulnerable to path traversal

2024-04-1600:30:34
CWE-22
GitHub Advisory Database
github.com
6
path traversal
vulnerability
localfilestore
filesystem
information disclosure
remote code execution
file paths
directory traversal
handling
software

CVSS3

6.5

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

NONE

Availability Impact

NONE

CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

AI Score

6.9

Confidence

High

EPSS

0

Percentile

10.5%

langchain-ai/langchain is vulnerable to path traversal due to improper limitation of a pathname to a restricted directory (‘Path Traversal’) in its LocalFileStore functionality. An attacker can leverage this vulnerability to read or write files anywhere on the filesystem, potentially leading to information disclosure or remote code execution. The issue lies in the handling of file paths in the mset and mget methods, where user-supplied input is not adequately sanitized, allowing directory traversal sequences to reach unintended directories.

Affected configurations

Vulners
Node
langchainlangchainRange<0.0.353
VendorProductVersionCPE
langchainlangchain*cpe:2.3:a:langchain:langchain:*:*:*:*:*:*:*:*

CVSS3

6.5

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

NONE

Availability Impact

NONE

CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

AI Score

6.9

Confidence

High

EPSS

0

Percentile

10.5%

Related for GHSA-RGP8-PM28-3759