Advisory

PYSEC-2026-1510

Also known as: CVE-2024-3571, GHSA-rgp8-pm28-3759

Summary

langchain vulnerable to path traversal

Details

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.

Severity

Medium Basis: CVSS v3 score 6.5, vector CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Dates

Published
2026-07-07 11:45 UTC
Modified
2026-07-07 17:46 UTC

Affected packages and fixes

langchain

PyPI · All systems

Affected

  • introduced 0, fixed 0.0.353 (ecosystem)

Fixed versions

0.0.353

Fix

  • Fixed version 0.0.353
    pip install --upgrade langchain==0.0.353

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences