Vulnerabilities in pkg:pypi/langchain-anthropic

PACKAGE
Advisory Identifier: GHSA-gr75-jv2w-4656
Advisory Summary

CVE-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/langchain-anthropic

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/langchain-anthropic. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-gr75-jv2w-4656 CVE-2026-55443 MODERATE LangChain: Path traversal and sandbox escape in LangChain file-search middleware and loaders

CVE-2026-55443 at a Glance

CVE Identifier CVE-2026-55443
GHSA Identifier GHSA-gr75-jv2w-4656
Severity MODERATE
CVSS v3.1 Base Score 5.1
CWE Classification CWE-59: Improper Link Resolution Before File Access ('Link Following')
Affected Product LangChain
Package Ecosystem PyPI
Published Date
Last Updated

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).

Attack Vector Local (AV:L)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (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.

langchain fixed: 1.3.9
pip install langchain>=1.3.9
langchain-anthropic fixed: 1.4.6
pip install langchain-anthropic>=1.4.6
Verify Direct and Transitive Dependencies

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

## 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 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. ## Compatibility Callers 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. ## Operational guidance Confine 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. ## LangSmith / hosted deployments note This issue concerns library components executed by agents.

CVE-2026-55443 Affected LangChain Versions

2 component(s)
Fixed Versions:
1.3.91.4.6
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?
CVE-2026-55443 is a security vulnerability in LangChain involving Path traversal and sandbox escape in LangChain file-search middleware and loaders under CWE-59: Improper Link Resolution Before File Access ('Link Following').
Which LangChain versions are affected?
Affected versions include releases prior to 1.3.9, 1.4.6 across affected packages: langchain, langchain-anthropic.
What version fixes CVE-2026-55443?
Upgrading to 1.3.9, 1.4.6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is langchain affected?
Yes, langchain is affected in releases prior to 1.3.9. Upgrade your dependency to 1.3.9 or later.
Is langchain-anthropic affected?
Yes, langchain-anthropic is affected in releases prior to 1.4.6. Upgrade your dependency to 1.4.6 or later.
What is the CVSS score of CVE-2026-55443?
CVE-2026-55443 has a CVSS v3.1 base score of 5.1 (MODERATE) with vector string CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-55443?
CVE-2026-55443 is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following') (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.).
How can I check PyPI dependencies for CVE-2026-55443?
Run the dependency tree command: 'pip show langchain'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}