Path Traversal in langchain-ai/langchain (langchain-ai langchain-ai/langchain)

CVE-2024-3571
MEDIUM 6.5

At a glance

Source
NVD
EPSS
EPSS 1.87 % · percentile 79 ()
State
PUBLISHED
Published
Updated
Assigner
@huntr_ai
NVD status
Analyzed

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.

Weaknesses (CWE)

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

References

Scores

VersionScoreVectorScored by
CVSS 3.0MEDIUM 6.5CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N@huntr_ai
CVSS 3.1HIGH 8.8CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HNVD · nvd@nist.gov (Primary)
CVSS 3.0MEDIUM 6.5CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:NNVD · security@huntr.dev (Secondary)

Advisories

European references

CERT-FR advisories

Affected configurations (NVD CPE)

Affected products

ProductVersions
langchain-ai · langchain-ai/langchainaffected unspecified < 0.0.353

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST — attribution requested
ENISA EUVDENISA — reproduction authorised, source acknowledged
CERT-FR (ANSSI)Licence Ouverte / Etalab 2.0
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain — this product uses data from the NVD API but is not endorsed or certified by the NVD