NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Anthropic SDKs

CVE-2026-41686: Claude SDK for TypeScript has Insecure Default File Permissions in Local Filesystem Memory Tool

mediumCVSS 4.0 4.8GHSA-p7fg-763f-g4gf

BetaLocalFilesystemMemoryTool in the Anthropic TypeScript SDK created memory files and directories with Node.js default modes, 0o666 and 0o777. Other local users could read agent memory, and in containers with a permissive umask they could change it to steer the model. Affects @anthropic-ai/sdk 0.79.0 up to 0.91.1; fixed in 0.91.1.

Published Apr 29, 2026 · Updated May 21, 2026 · Analysis Oct 28, 2026

What an attacker can do

The memory tool persists what an agent remembers as files on the local filesystem. It made those files and directories without setting restrictive modes, so they got the Node.js defaults of 0o666 for files and 0o777 for directories. With a standard umask of 022 that leaves them readable by every local user. With a permissive umask, as in many Docker base images, they are also writable by everyone (CWE-732).

On a shared host, a local user without any special rights can read the persisted agent state. That may contain user data, notes or secrets the agent stored. In containerised deployments with a loose umask, a local attacker, or another process in the same container, can edit the memory files. The model reads the memory back in later turns, so tampered text can influence its behaviour, which is a form of persistent prompt injection.

The attack is local only, and needs a low-privilege account on the same host or container. The CVSS 4.0 score is 4.8.

Who is affected

The npm package @anthropic-ai/sdk from 0.79.0 up to but not including 0.91.1, for applications that use BetaLocalFilesystemMemoryTool. Check the version and the permissions of your memory directory.

npm ls @anthropic-ai/sdk
ls -l <memory directory>

@anthropic-ai/sdk

Ecosystem
npm
Affected
>= 0.79.0, < 0.91.1
Fixed in
0.91.1
Check
npm ls @anthropic-ai/sdk

How to fix it

Upgrade to @anthropic-ai/sdk 0.91.1:

npm install @anthropic-ai/[email protected]

Files created by older versions keep their old modes, so tighten them yourself. For example, set the memory directory to 0700 and the files to 0600 with chmod, and set a restrictive umask (such as 077) for the service. The advisory only recommends updating.

How to tell if you were hit

List the memory directory and files with ls -l and look for group- or world-readable or writable modes. Check modification times and content of memory files for edits you did not expect, such as instructions addressed to the model. In shared environments, check which users or processes have accessed the path.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

The BetaLocalFilesystemMemoryTool in the Anthropic TypeScript SDK created memory files and directories using the Node.js default modes (0o666 for files, 0o777 for directories), leaving them world-readable on systems with a standard umask and world-writable in environments with a permissive umask such as many Docker base images. A local attacker on a shared host could read persisted agent state, and in containerized deployments could modify memory files to influence subsequent model behavior.

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

Claude SDK thanks lucasfutures for the report.

Credited to gn00295120.

Questions

Is a remote attacker able to exploit this?

No. The CVSS 4.0 vector is local with low privileges. The attacker needs access to the same host or container.

Does upgrading fix existing files?

The advisory does not say it does. Existing files keep the modes they were created with, so check and tighten them.

Which version fixes CVE-2026-41686?

@anthropic-ai/sdk 0.91.1. Versions from 0.79.0 up to it are affected, per the advisory.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Anthropic SDKs vulnerabilities

All Anthropic SDKs entries