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-ai/sdk | npm | >= 0.79.0, < 0.81.0 | 0.81.0 |
Do you use @anthropic-ai/sdk? You're affected.
Severity & Risk
What should I do?
1 step-
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.
CISA SSVC Assessment
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
Classification
Compliance Impact
This CVE is relevant to:
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.
Technical Details
NVD Description
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)
References
- github.com/advisories/GHSA-5474-4w2j-mq4c
- nvd.nist.gov/vuln/detail/CVE-2026-34451
- github.com/anthropics/anthropic-sdk-typescript/commit/0ac69b3438ee9c96b21a7d3c39c07b7cdb6995d9
- github.com/anthropics/anthropic-sdk-typescript/releases/tag/sdk-v0.81.0
- github.com/anthropics/anthropic-sdk-typescript/security/advisories/GHSA-5474-4w2j-mq4c
Timeline
Related Vulnerabilities
CVE-2026-35020 8.4 Claude Code CLI: OS command injection via TERMINAL env
Same package: @anthropic-ai/sdk CVE-2026-41686 @anthropic-ai/sdk: insecure file perms expose agent memory
Same package: @anthropic-ai/sdk CVE-2025-5120 10.0 smolagents: sandbox escape enables unauthenticated RCE
Same attack type: Code Execution CVE-2025-53767 10.0 Azure OpenAI: SSRF EoP, no auth required (CVSS 10)
Same attack type: Data Extraction CVE-2025-2828 10.0 LangChain RequestsToolkit: SSRF exposes cloud metadata
Same attack type: Data Extraction