Vulnerabilities in pkg:npm/@anthropic-ai/sdk

PACKAGE
Advisory Identifier: GHSA-p7fg-763f-g4gf
Advisory Summary

CVE-2026-41686 is a MODERATE claude sdk for typescript has vulnerability (CWE-732: Incorrect Permission Assignment for Critical Resource) affecting @anthropic ai/sdk libraries in the npm ecosystem. The issue involves claude sdk for typescript has insecure default file permissions in local filesystem memory tool. Remediation is available by upgrading affected packages to version 0.91.1.

2 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@anthropic-ai/sdk

2 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@anthropic-ai/sdk. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-p7fg-763f-g4gf CVE-2026-41686 MODERATE Claude SDK for TypeScript has Insecure Default File Permissions in Local Filesystem Memory Tool
GHSA-5474-4w2j-mq4c CVE-2026-34451 MODERATE Claude SDK for TypeScript: Memory Tool Path Validation Allows Sandbox Escape to Sibling Directories

CVE-2026-41686 at a Glance

CVE Identifier CVE-2026-41686
GHSA Identifier GHSA-p7fg-763f-g4gf
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-732: Incorrect Permission Assignment for Critical Resource
Affected Product @anthropic ai/sdk
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-41686

To remediate this vulnerability, upgrade all affected @anthropic ai/sdk dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@anthropic-ai/sdk fixed: 0.91.1
npm install @anthropic-ai/sdk@0.91.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @anthropic-ai/sdk

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-41686, inspect your project dependencies using npm:

npm ls @anthropic-ai/sdk

Analyze the terminal output to locate any version of @anthropic ai/sdk in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.91.1), your application is affected.

Note: The npm ls @anthropic-ai/sdk command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-732: Incorrect Permission Assignment for Critical Resource, where the product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors. In @anthropic ai/sdk, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2026-41686 Affected @anthropic ai/sdk Versions

1 component(s)
Fixed Versions:
0.91.1
Product / Package Ecosystem Affected Versions Fixed Version
@anthropic-ai/sdk
npm
≥ 0.79.0
< 0.91.1
0.91.1

References

Frequently Asked Questions

What is CVE-2026-41686?
CVE-2026-41686 is a security vulnerability in @anthropic ai/sdk involving Claude SDK for TypeScript has Insecure Default File Permissions in Local Filesystem Memory Tool under CWE-732: Incorrect Permission Assignment for Critical Resource.
Which @anthropic ai/sdk versions are affected?
Affected versions include releases prior to 0.91.1 across affected packages: @anthropic-ai/sdk.
What version fixes CVE-2026-41686?
Upgrading to 0.91.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @anthropic-ai/sdk affected?
Yes, @anthropic-ai/sdk is affected in releases prior to 0.91.1. Upgrade your dependency to 0.91.1 or later.
What CWE is associated with CVE-2026-41686?
CVE-2026-41686 is classified under CWE-732: Incorrect Permission Assignment for Critical Resource (The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors.).
How can I check npm dependencies for CVE-2026-41686?
Run the dependency tree command: 'npm ls @anthropic-ai/sdk'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-p7fg-763f-g4gf",
  "modified" : "2026-05-08T01:30:32Z",
  "published" : "2026-04-29T22:28:12Z",
  "aliases" : [ "CVE-2026-41686" ],
  "summary" : "Claude SDK for TypeScript has Insecure Default File Permissions in Local Filesystem Memory Tool",
  "details" : "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.\n\nUsers on the affected versions are advised to update to the latest version.\n\nClaude SDK  thanks `lucasfutures` for the report.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@anthropic-ai/sdk"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.79.0"
      }, {
        "fixed" : "0.91.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/anthropics/anthropic-sdk-typescript/security/advisories/GHSA-p7fg-763f-g4gf"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-41686"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/anthropics/anthropic-sdk-typescript"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-732" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-29T22:28:12Z",
    "nvd_published_at" : "2026-05-04T19:16:03Z"
  }
}