GitHub Advisoryadvisory · PyPI

GHSA-rgp8-pm28-3759 langchain vulnerable to path traversal

MEDIUM Published 2024-04-16 Modified 2024-04-16 Official page ↗
Aliases
CVE-2024-3571
Ecosystem
PyPI
Packages
langchain
Severity
Moderate
CVSS vector
CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Weaknesses
CWE-22
Reviewed
2024-04-16

Affected packages

• PyPI langchain: < 0.0.353 → fixed in 0.0.353

Description

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.

Related

Alias · CVE (1)

  • CVE-2024-3571 langchain-ai/langchain is vulnerable to path traversal due to improper limitation of a pathname to a restricted directory ('Path… vulnerability

Weakness · CWE (1)

  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory weakness

References