CVE-2026-55443: LangChain Path Traversal Vulnerability
MODERATECVE-2026-55443 is a MODERATE (CVSS 5.1) path traversal vulnerability (CWE-59: Improper Link Resolution Before File Access ('Link Following')) affecting LangChain libraries in the PyPI ecosystem. The issue involves path traversal and sandbox escape in langchain file-search middleware and loaders. Remediation is available by upgrading affected packages to version 1.3.9, 1.4.6.
CVE-2026-55443 at a Glance
Security Impact
CVSS: 5.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2026-55443
To remediate this vulnerability, upgrade all affected LangChain dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install langchain>=1.3.9
pip install langchain-anthropic>=1.4.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show langchain
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-55443, inspect your installed packages using pip:
pip show langchain
Analyze the terminal output to locate any version of LangChain in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.9), your application is affected.
Note: The pip show langchain command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following'), where the product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource. In LangChain, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-55443 Affected LangChain Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
langchain
|
PyPI |
< 1.3.9
|
1.3.9
|
|
langchain-anthropic
|
PyPI |
< 1.4.6
|
1.4.6
|
References
Frequently Asked Questions
What is CVE-2026-55443?
Which LangChain versions are affected?
What version fixes CVE-2026-55443?
Is langchain affected?
Is langchain-anthropic affected?
What is the CVSS score of CVE-2026-55443?
What CWE is associated with CVE-2026-55443?
How can I check PyPI dependencies for CVE-2026-55443?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-gr75-jv2w-4656",
"modified" : "2026-07-08T17:36:59Z",
"published" : "2026-06-16T15:03:14Z",
"aliases" : [ "CVE-2026-55443" ],
"summary" : "LangChain: Path traversal and sandbox escape in LangChain file-search middleware and loaders",
"details" : "## Summary\n\nSeveral 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.\n\n## Affected users / systems\n\nYou 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.\n\n## Impact\n\n- Confidentiality: disclosure of file contents outside the intended root/sandbox.\n- Authorization: path-prefix bypass can grant access to sibling resources beyond the intended subtree.\n\n## Patches / mitigation\n\nThe 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 and reject symlink escapes unless the caller explicitly opts in to dangerous loading; and path-prefix checks will enforce a path-segment boundary. Path validation will be made operating-system-portable.\n\n## Compatibility\n\nCallers that already pass only in-root paths, validated configuration, and trusted search inputs see no behavioral change. Callers that intentionally reference external paths can opt in via the existing dangerous-loading flag.\n\n## Operational guidance\n\nConfine filesystem-backed agent tools to a dedicated directory and prefer running them sandboxed/containerized; validate path and identifier inputs where untrusted input enters; do not enable dangerous loading for configuration whose origin you do not control.\n\n## LangSmith / hosted deployments note\n\nThis issue concerns library components executed by agents.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "langchain"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.3.9"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.3.8"
}
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "langchain-anthropic"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.4.6"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.4.5"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/langchain-ai/langchain/security/advisories/GHSA-gr75-jv2w-4656"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-55443"
}, {
"type" : "WEB",
"url" : "https://github.com/langchain-ai/langchain/commit/dcaf7795a3e6590af55c3ff7bda6add6355e9ea6"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/langchain-ai/langchain"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22", "CWE-59" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-16T15:03:14Z",
"nvd_published_at" : "2026-06-22T19:17:21Z"
}
}