Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. langchain
  4. ›
  5. CVE-2024-3571

CVE-2024-3571: langchain vulnerable to path traversal

April 16, 2024

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.

References

  • github.com/advisories/GHSA-rgp8-pm28-3759
  • github.com/langchain-ai/langchain
  • github.com/langchain-ai/langchain/commit/aad3d8bd47d7f5598156ff2bdcc8f736f24a7412
  • huntr.com/bounties/2df3acdc-ee4f-4257-bbf8-a7de3870a9d8
  • nvd.nist.gov/vuln/detail/CVE-2024-3571

Code Behaviors & Features

Detect and mitigate CVE-2024-3571 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.0.353

Fixed versions

  • 0.0.353

Solution

Upgrade to version 0.0.353 or above.

Impact 6.5 MEDIUM

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

Learn more about CVSS

Weakness

  • CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

Source file

pypi/langchain/CVE-2024-3571.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:41 +0000.