# CVE-2026-55443: LangChain: Path traversal and sandbox escape in LangChain file-search middleware and loaders

> Attackers can read files outside the intended directory via path traversal in LangChain file-search middleware and loaders when processing untrusted input.

- **Severity:** Medium 5.1 (`CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 22 Jun 2026
- **Updated:** 22 Jun 2026
- **Also known as:** CLEANSTART-2026-PK67408, ECHO-7afa-b4aa-5d4a, GHSA-gr75-jv2w-4656, PYSEC-2026-2192, PYSEC-2026-2556, ROOT-APP-PYPI-CVE-2026-55443, ROOT-APP-PYPI-GHSA-gr75-jv2w-4656, openSUSE-SU-2026:11946-1

## What is CVE-2026-55443?

CVE-2026-55443 is a medium-severity path traversal vulnerability in langchain-ai langchain, published on 22 Jun 2026. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

LangChain is a framework for building agents and LLM-powered applications. Prior to 1.3.9, 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. This vulnerability is fixed in 1.3.9.

Weakness: CWE-59 (Improper Link Resolution Before File Access), CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2026-55443?

6 open source packages ship an affected version, including langchain and langchain-anthropic. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `langchain` | PyPI | All versions | 1.3.9 |
| `langchain` | PyPI | All versions | 1.3.9 |
| `langchain` | PyPI | All versions | 1.3.9 |
| `langchain-anthropic` | PyPI | All versions | 1.4.6 |
| `langchain-anthropic` | PyPI | All versions | 1.4.6 |
| `langchain-anthropic` | PyPI | All versions | 1.4.6 |
| `python-langchain-anthropic` | openSUSE:Tumbleweed | All versions | 1.7.5-1.1 |

Products: Langchain Langchain.

## How do I fix CVE-2026-55443?

Upgrade langchain to 1.3.9 or later.

## Is CVE-2026-55443 being exploited?

There is no known exploitation of CVE-2026-55443 in the wild and no public exploit code.

## Other vulnerabilities in langchain-ai langchain

- [CVE-2023-39631](https://insights.sbomify.com/CVE-2023-39631/): Langchain vulnerable to arbitrary code execution via the evaluate function in the numexpr library (critical 9.8)
- [CVE-2023-36281](https://insights.sbomify.com/CVE-2023-36281/): langchain vulnerable to arbitrary code execution (critical 9.8)
- [CVE-2023-38860](https://insights.sbomify.com/CVE-2023-38860/): LangChain vulnerable to arbitrary code execution (critical 9.8)
- [CVE-2023-38896](https://insights.sbomify.com/CVE-2023-38896/): LangChain vulnerable to arbitrary code execution (critical 9.8)
- [CVE-2023-39659](https://insights.sbomify.com/CVE-2023-39659/): LangChain vulnerable to arbitrary code execution (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-55443 and fix it if it is affected.

What it is: CVE-2026-55443 is a medium-severity path traversal vulnerability in langchain-ai langchain, published on 22 Jun 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-55443 in the wild and no public exploit code.

Affected packages and fixed versions:
- langchain (PyPI): affected all versions; fixed in 1.3.9
- langchain (PyPI): affected all versions; fixed in 1.3.9
- langchain (PyPI): affected all versions; fixed in 1.3.9
- langchain-anthropic (PyPI): affected all versions; fixed in 1.4.6
- langchain-anthropic (PyPI): affected all versions; fixed in 1.4.6
- langchain-anthropic (PyPI): affected all versions; fixed in 1.4.6

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-55443/ (Markdown: https://insights.sbomify.com/CVE-2026-55443/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-55443
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-55443
- OSV: https://osv.dev/vulnerability/CVE-2026-55443

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-55443/
Summaries are generated and may contain mistakes; the official description above is the record.
