CVE-2026-34451 Claude SDK for TypeScript: Memory Tool Path Validation Allows Sandbox Escape to Sibling Directories

Medium 6.3 Published Updated

Prompt injection allows attackers to escape the memory tool sandbox and read or write files in sibling directories via flawed path validation.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-34451?

CVE-2026-34451 is a medium-severity path traversal vulnerability in anthropics anthropic-sdk-typescript, published on 31 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-41, CWE-22

Which versions are affected by CVE-2026-34451?

2 open source packages ship an affected version, including @anthropic-ai/sdk. It affects 1 product.

PackageAffectedFixed in
@anthropic-ai/sdk npmFrom 0.79.00.81.0
@anthropic-ai/sdk npmFrom 0.79.00.81.0

Products include Anthropic Claude Sdk for Typescript.

How do I fix CVE-2026-34451?

Upgrade @anthropic-ai/sdk to 0.81.0 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2026-34451 being exploited?

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

Sources

Also known as GHSA-5474-4w2j-mq4c, MINI-c7c2-44rc-8m8g.

Is CVE-2026-34451 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free