CVE-2026-34451: anthropic-ai/sdk: memory tool path traversal escape

GHSA-5474-4w2j-mq4c MEDIUM
Published March 31, 2026
CISO Take

The Anthropic TypeScript SDK's local filesystem memory tool fails to properly sandbox model-supplied paths, allowing a prompt-injected model to traverse outside the intended memory directory and read or write arbitrary files on the host. Any agentic application using @anthropic-ai/sdk 0.79.0–0.80.x that processes untrusted content is at material risk of credential theft or data exfiltration. Patch to 0.81.0 immediately and audit agent pipelines for prompt injection entry points.

What is the risk?

Medium severity on paper, but contextually elevated for agentic deployments. Exploitation requires chaining prompt injection — common in content-processing agents — with a path crafting step, placing it at moderate skill threshold. Impact is high: unrestricted read/write to the host filesystem enables credential theft, config exfiltration, or persistent backdoor placement. Low EPSS (0.00044) indicates no active mass exploitation, but targeted attacks against known agentic deployments using this SDK version are plausible and technically straightforward once the injection vector is established.

What systems are affected?

Package Ecosystem Vulnerable Range Patched
Anthropic Node npm >= 0.79.0, < 0.81.0 0.81.0
2.0K 280 dependents Pushed 6d ago 67% patched ~3d to patch Full package profile →

Do you use Anthropic Node? You're affected.

How severe is it?

CVSS 3.1
N/A
EPSS
0.3%
chance of exploitation in 30 days
Higher than 21% of all CVEs
Exploitation Status
No known exploitation
Sophistication
Moderate

What should I do?

1 step
  1. 1) Upgrade @anthropic-ai/sdk to 0.81.0 immediately — the fix appends a trailing path separator before the prefix check, closing the traversal. 2) If patching is blocked, disable or remove the local filesystem memory tool from agent configurations entirely. 3) Apply OS-level sandboxing (seccomp profiles, containers with read-only mounts, restricted filesystem namespaces) as defense-in-depth regardless of SDK version. 4) Audit all agent pipelines for untrusted content ingestion paths that could deliver indirect prompt injection payloads. 5) Monitor filesystem access logs for anomalous reads/writes originating from the agent process. 6) Add integration tests asserting the memory tool cannot access paths outside its configured root.

What does CISA's SSVC say?

Decision Track
Exploitation none
Automatable No
Technical Impact partial

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

How is it classified?

Which compliance frameworks are affected?

This CVE is relevant to:

EU AI Act
Art.15 - Accuracy, Robustness and Cybersecurity
ISO 42001
A.6.2 - AI Risk Assessment A.9.3 - AI System Security Controls
NIST AI RMF
GOVERN 1.7 - AI Risk Identification and Management Processes MEASURE 2.5 - AI System Testing for Trustworthiness
OWASP LLM Top 10
LLM01:2025 - Prompt Injection LLM05:2025 - Improper Output Handling

Frequently Asked Questions

What is CVE-2026-34451?

The Anthropic TypeScript SDK's local filesystem memory tool fails to properly sandbox model-supplied paths, allowing a prompt-injected model to traverse outside the intended memory directory and read or write arbitrary files on the host. Any agentic application using @anthropic-ai/sdk 0.79.0–0.80.x that processes untrusted content is at material risk of credential theft or data exfiltration. Patch to 0.81.0 immediately and audit agent pipelines for prompt injection entry points.

Is CVE-2026-34451 actively exploited?

No confirmed active exploitation of CVE-2026-34451 has been reported, but organizations should still patch proactively.

How to fix CVE-2026-34451?

1) Upgrade @anthropic-ai/sdk to 0.81.0 immediately — the fix appends a trailing path separator before the prefix check, closing the traversal. 2) If patching is blocked, disable or remove the local filesystem memory tool from agent configurations entirely. 3) Apply OS-level sandboxing (seccomp profiles, containers with read-only mounts, restricted filesystem namespaces) as defense-in-depth regardless of SDK version. 4) Audit all agent pipelines for untrusted content ingestion paths that could deliver indirect prompt injection payloads. 5) Monitor filesystem access logs for anomalous reads/writes originating from the agent process. 6) Add integration tests asserting the memory tool cannot access paths outside its configured root.

What systems are affected by CVE-2026-34451?

This vulnerability affects the following AI/ML architecture patterns: agent frameworks, RAG pipelines, agentic coding assistants, document processing pipelines, email and calendar agents.

What is the CVSS score for CVE-2026-34451?

No CVSS score has been assigned yet.

What is the AI security impact?

Affected AI Architectures

agent frameworksRAG pipelinesagentic coding assistantsdocument processing pipelinesemail and calendar agents

MITRE ATLAS Techniques

AML.T0010.001 AI Software
AML.T0037 Data from Local System
AML.T0051.001 Indirect
AML.T0053 AI Agent Tool Invocation
AML.T0080.000 Memory
AML.T0086 Exfiltration via AI Agent Tool Invocation

Compliance Controls Affected

EU AI Act: Art.15
ISO 42001: A.6.2, A.9.3
NIST AI RMF: GOVERN 1.7, MEASURE 2.5
OWASP LLM Top 10: LLM01:2025, LLM05:2025

What are the technical details?

Original Advisory

Claude SDK for TypeScript provides access to the Claude API from server-side TypeScript or JavaScript applications. From version 0.79.0 to before version 0.81.0, the local filesystem memory tool in the Anthropic TypeScript SDK validated model-supplied paths using a string prefix check that did not append a trailing path separator. A model steered by prompt injection could supply a crafted path that resolved to a sibling directory sharing the memory root's name as a prefix, allowing reads and writes outside the sandboxed memory directory. This issue has been patched in version 0.81.0.

Exploitation Scenario

An attacker publishes a document or web page containing an indirect prompt injection payload. When the Claude agent processes this content — via RAG retrieval, email summarization, or a browsing task — the injected instruction directs the model to invoke the filesystem memory tool with a crafted path such as '/opt/app-memory-secrets/db.env', where 'app-memory-secrets' passes the naive prefix check against configured root '/opt/app-memory' because no trailing separator is enforced. The SDK resolves the path outside the sandbox, and the model returns or stores the file contents. The attacker retrieves exfiltrated credentials or secrets through the agent's normal output channel with no filesystem-level alerts triggered.

Weaknesses (CWE)

CWE-22 — Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'): The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

  • [Implementation] Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylis
  • [Architecture and Design] For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.

Source: MITRE CWE corpus.

Timeline

Published
March 31, 2026
Last Modified
April 1, 2026
First Seen
March 31, 2026

Related Vulnerabilities