mediumCVSS 5.1Vulnerability

GHSA-gr75-jv2w-4656

## Summary Several LangChain components that resolve filesystem paths or expand search patterns do not consistently confine the *resolved* path to the intended root directory. Affected behaviors include: a file-search agent middleware that validates a starting directory but not the search pattern or the resolved target of matched files, so glob patterns and symlinks can reach files outside the configured root; prompt- and chain/agent-configuration loaders that accept path fields and resolve them without confining the result to a trusted base or rejecting symlink targets; and path-prefix authorization checks that compare by string prefix without a path-segment boundary, so a sibling path sharing the prefix is accepted. When these components receive path values, search patterns, or workspace contents influenced by an untrusted source — including an LLM acting on untrusted input — the result can be disclosure of files outside the intended boundary. We have no evidence of this behavior being triggered in the wild. ## Affected users / systems You may be affected if you expose an agent with filesystem-search middleware over a directory and accept prompts or retrieved content influenced by untrusted sources; load prompt or chain/agent configuration from untrusted or shared sources; or rely on path-prefix restrictions to confine tool file access. Callers that confine these components to fully trusted inputs and first-party configuration are not affected. ## Impact - Confidentiality: disclosure of file contents outside the intended root/sandbox. - Authorization: path-prefix bypass can grant access to sibling resources beyond the intended subtree. ## Patches / mitigation The affected components will canonicalize candidate paths (resolving symlinks) and verify the resolved real path remains within the configured root before reading or returning it; search patterns will be normalized so they cannot escape the root; configuration loaders will confine resolved path fields

Properties

ghsa_id
GHSA-gr75-jv2w-4656
severity
medium
summary
LangChain: Path traversal and sandbox escape in LangChain file-search middleware and loaders
cvss_score
5.1
cve_id
GHSA-gr75-jv2w-4656
cvss_vector
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
is_ghsa_only
true
ghsa_published
2026-06-16T15:03:14Z
source_url
https://github.com/advisories/GHSA-gr75-jv2w-4656
ghsa_updated
2026-06-16T15:03:15Z

Related Entities (7)

VULNERABLE_TO (2)

[Software]pip/langchain-anthropic
[Software]pip/langchain

AFFECTS (2)

[Software]pip/langchain
[Software]pip/langchain-anthropic

HAS_WEAKNESS (2)

[Weakness]Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
[Weakness]Improper Link Resolution Before File Access ('Link Following')

REPORTED_BY (1)

[Source]GitHub Advisory Database

Explore deeper with Ninja Signal's threat intelligence graph

GHSA-gr75-jv2w-4656 (CVSS 5.1) — Ninja Signal Threat Intelligence | Ninja Signal