Packages / @anthropic-ai/sdk / Security

ModerateVulnerabilityGHSA-5474-4w2j-mq4cCVE-2026-34451Published 1 Apr 2026

Claude SDK for TypeScript: Memory Tool Path Validation Allows Sandbox Escape to Sibling Directories

Affected releases · @anthropic-ai/sdk

  • 0.80.x0.80.0No fix on this line yet
  • 0.79.x0.79.0No fix on this line yet

0.80.x has no fix yet; the newest fixed line:

npm install @anthropic-ai/sdk@0.81.0
1.x
  1. Not affected

    1.0.0 – 1.1.0

    2 releases, latest

0.x
  1. Not affected

    0.2.0 – 0.78.0

    143 releases

  2. Affected

    0.79.0 – 0.80.0

    2 releases

  3. Fixed

    0.81.0 – 0.137.0

    72 releases

219 stable releases of @anthropic-ai/sdk, oldest to newest, one row per major.

Is your project affected?

Paste your package.json, or type the range you declare for @anthropic-ai/sdk. It is read in your browser and sent nowhere.

What happens

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.

Users on the affected versions are advised to update to the latest version.

Claude SDK for TypeScript thanks hackerone.com/nicksim for reporting this issue!