Skip to main content

LangChain CVE-2026-55443

| EUVDEUVD-2026-38332 MEDIUM
Path Traversal (CWE-22)
2026-06-22 GitHub_M
5.5
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Attacker submits crafted path via prompt
  2. Delivery
    Application passes path to file-search middleware
  3. Exploit
    Middleware skips pattern/symlink validation
  4. Execution
    Filesystem traversal escapes configured root
  5. Impact
    Sensitive files returned outside sandbox

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the target application uses at least one of three affected LangChain components: (1) FilesystemFileSearchMiddleware configured with a root directory and receiving user-controlled or LLM-generated glob patterns or base path values - the middleware validated the starting directory parameter but not the pattern or symlink targets of matched files; (2) prompt or chain/agent configuration loaders that accept a path field from untrusted or shared sources and resolve it without confining the result to a trusted base directory; or (3) path-prefix authorization logic reachable with attacker-influenced path strings, where a sibling path sharing the same string prefix can be accepted. In all cases, the attacker must control or influence the input channel that reaches the vulnerable component - this can be direct API/UI input or indirect LLM prompt injection via untrusted retrieved content. Exploitation is further limited by the need to know or enumerate the target host's filesystem layout, the requirement that the application is deployed with filesystem-backed LangChain components (not universal across LangChain deployments), and the application accepting untrusted input to the relevant code paths. Callers that pass only internally-generated, validated inputs to these components are not affected.

Impact

The NVD-assigned vector CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N yields a score of 5.1 (Medium). The AV:L assignment warrants scrutiny: LangChain is predominantly deployed as a network-accessible API or web service, and the attack input - crafted glob patterns, symlinked paths, or malicious configuration fields - can be submitted over the network by an unauthenticated user or injected indirectly via LLM prompt injection on untrusted retrieved content. An AV:N assignment is more consistent with the realistic attack surface and would yield a score closer to 5.9. AC:H is defensible because exploitation requires specific deployment conditions: the attacker must reach one of the three vulnerable components, must know or guess the target filesystem layout, and the application must be configured with filesystem-backed agent middleware or untrusted configuration loading. The GHSA advisory explicitly states no evidence of in-the-wild triggering, and the CVE is not in CISA KEV. No EPSS score was provided in the input data; exploitation probability must be inferred contextually. Real-world priority should be elevated for any deployment where user-controlled prompts or externally retrieved content can reach LangChain's file-search middleware or configuration loaders, as the confidentiality impact (C:H) is severe - arbitrary file read on the host.

Exploit ScenarioDerived

An attacker interacting with a public-facing LangChain-based assistant submits a prompt instructing the embedded LLM to search for files matching the pattern ../../etc/passwd or to load an agent configuration from a symlinked path pointing outside the sandbox root. The file-search middleware or configuration loader resolves the path without rejecting the .. component or verifying the symlink target remains within the configured root, returning host file contents to the attacker. No public exploit code has been identified at time of analysis.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 22, 2026

Path traversal and sandbox escape in LangChain prior to 1.3.9 allow untrusted inputs - including LLM-generated content steered by adversarial prompts - to escape a configured filesystem root boundary. Three components are affected: a file-search agent middleware that validates a starting directory but not glob patterns or symlink targets; prompt and chain/agent configuration loaders that resolve path fields without root confinement; and path-prefix authorization logic that performs string-prefix comparison without segment boundaries, allowing sibling paths to bypass access controls. No public exploit code has been identified at time of analysis and this CVE does not appear in CISA KEV, but the risk is meaningful for any deployment that exposes LangChain filesystem agents to untrusted user input or LLM prompt injection.

RemediationAI

Vendor-released patch: langchain 1.3.9 and langchain-anthropic 1.4.6. Upgrade both packages immediately via pip install --upgrade langchain1.3.9 langchain-anthropic1.4.6. The fix is confirmed in commit dcaf7795a3e6590af55c3ff7bda6add6355e9ea6 and detailed in GHSA-gr75-jv2w-4656 (https://github.com/langchain-ai/langchain/security/advisories/GHSA-gr75-jv2w-4656). If patching is not immediately feasible, restrict filesystem-backed agent components to fully trusted, internally-generated inputs by removing any code paths that allow user-supplied prompts or LLM-generated content to influence path values, glob patterns, or configuration source paths. Disable the dangerous-loading opt-in flag in configuration loaders if it is enabled in production, as this flag bypasses symlink protections. Audit all deployments where FilesystemFileSearchMiddleware is used with a user-facing input channel, as these represent the highest-risk configuration. Applications that pass only first-party, trusted inputs to these components require no immediate action but should still be upgraded.

Affected VersionsENISA

langchain-anthropic < 1.4.6
langchain < 1.3.9

Affected Packages

pypi langchain fix: 1.3.9
pypi langchain-anthropic fix: 1.4.6

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

LangChain (pip packages langchain and langchain-anthropic) is a Python framework for orchestrating LLM-based agents, chains, and tool-calling workflows. The vulnerability is a CWE-22 (Path Traversal) class defect with three distinct manifestations in the same codebase. First, FilesystemFileSearchMiddleware.glob_search validated the starting directory but forwarded the glob pattern to Path.glob without rejecting .. components or absolute paths, and enumerated matching files via rglob with followlinks=True (Python's default), allowing in-root symlinks pointing outside the root to be followed. Second, configuration loaders resolved path fields from untrusted YAML/JSON without calling Path.resolve() and comparing against a trusted base. Third, path-prefix authorization compared paths by string prefix rather than by normalized segment boundary, so /data/foo authorization could be bypassed by the path /data/foobar. The fix in commit dcaf7795 introduces _is_within_root() using Path.resolve().is_relative_to(), switches directory walking to os.walk(followlinks=False), rejects glob patterns starting with / or containing .. components, and applies containment checks post-symlink-resolution. Affected CPEs are cpe:2.3:a:langchain-ai:langchain:*:*:*:*:*:*:*:* and cpe:2.3:a:langchain-ai:langchain-anthropic:*:*:*:*:*:*:*:*.

Know when Langchain gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY MEDIUM
NVD 5.5 MEDIUM
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
vuln.today AI 5.9 MEDIUM

LangChain apps typically accept malicious prompts over a network; AC:H for required filesystem knowledge and specific component deployment; no integrity or availability impact.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
SUSE MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorNVD

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Lifecycle Timeline

2
CVSS changed
Jun 26, 2026 - 20:07 NVD
5.1 (MEDIUM) 5.5 (MEDIUM)
Patch available
Jun 22, 2026 - 20:01 EUVD

DescriptionNVD

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.

Threat Intelligence Overview

EPSS Score
0.2%
Top 93% exploitable
Prevalence
Medium
Popular LLM framework, growing but not yet ubiquitous
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

28
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +28
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

CVE-2026-27966 CRITICAL POC
9.8 Feb 26

Code injection in Langflow CSV Agent node before 1.8.0. The node hardcodes allow_dangerous_code=True, enabling arbitrary

CVE-2023-36095 CRITICAL POC
9.8 Aug 05

An issue in Harrison Chase langchain v.0.0.194 allows an attacker to execute arbitrary code via the python exec calls in

CVE-2025-2828 CRITICAL POC
10.0 Jun 23

A remote code execution vulnerability in langchain-ai/langchain (CVSS 10.0). Risk factors: public PoC available. Vendor

CVE-2024-8309 CRITICAL POC
9.8 Oct 29

A vulnerability in the GraphCypherQAChain class of langchain-ai/langchain version 0.2.5 allows for SQL injection through

CVE-2024-7042 CRITICAL POC
9.8 Oct 29

A vulnerability in the GraphCypherQAChain class of langchain-ai/langchainjs versions 0.2.5 and all versions with this cl

CVE-2024-46946 CRITICAL POC
9.8 Sep 19

langchain_experimental (aka LangChain Experimental) 0.1.17 through 0.3.0 for LangChain allows attackers to execute arbit

CVE-2024-2057 CRITICAL POC
9.8 Mar 01

A vulnerability was found in LangChain langchain_community 0.0.26. Rated critical severity (CVSS 9.8), this vulnerabilit

CVE-2023-39631 CRITICAL POC
9.8 Sep 01

An issue in LanChain-ai Langchain v.0.0.245 allows a remote attacker to execute arbitrary code via the evaluate function

CVE-2023-36281 CRITICAL POC
9.8 Aug 22

An issue in langchain v.0.0.171 allows a remote attacker to execute arbitrary code via a JSON file to load_prompt. Rated

CVE-2023-39659 CRITICAL POC
9.8 Aug 15

An issue in langchain langchain-ai v.0.0.232 and before allows a remote attacker to execute arbitrary code via a crafted

CVE-2023-38896 CRITICAL POC
9.8 Aug 15

An issue in Harrison Chase langchain v.0.0.194 and before allows a remote attacker to execute arbitrary code via the fro

CVE-2023-38860 CRITICAL POC
9.8 Aug 15

An issue in LangChain v.0.0.231 allows a remote attacker to execute arbitrary code via the prompt parameter. Rated criti

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
openSUSE Tumbleweed Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy