Skip to content

GHSA-q5f5-3gjm-7mfm CVE-2026-34450 PYSEC-2026-2114

Claude SDK for Python has Insecure Default File Permissions in Local Filesystem Memory Tool

Medium PyPI
Severity
4.8 / 10
Medium · CVSS 4.0
Exploit chance (EPSS)
0.13%
Chance of exploitation in the next 30 days. Higher than 2.32% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-276 Incorrect Default Permissions
CWE-732 Incorrect Permission Assignment for Critical Resource
Fix
0.87.0
Upgrade anthropic to this version or later

Description

The local filesystem memory tool in the Anthropic Python SDK created memory files with mode 0o666, 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. Both the synchronous and asynchronous memory tool implementations were affected.

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

Claude SDK for Python thanks lucasfutures on HackerOne for the report.

Affected versions

PyPI

PackageVulnerableFixed in
anthropic
>= 0.86.0, < 0.87.0
0.87.0
anthropic
>= 0.86.0, < 0.87.0
0.87.0

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

anthropic PyPI → 0.87.0

pip
pip install --upgrade "anthropic>=0.87.0"
poetry
poetry add "anthropic>=0.87.0"
uv
uv add "anthropic>=0.87.0"

Severity breakdown

CVSS 4.0 4.8

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

Attack vector
Local
Attack complexity
Low
Attack requirements
None
Privileges required
Low
User interaction
None
Confidentiality (vulnerable system)
Low
Integrity (vulnerable system)
Low
Availability (vulnerable system)
None
Confidentiality (subsequent systems)
None
Integrity (subsequent systems)
None
Availability (subsequent systems)
None

CVSS 3.1 4.4

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N

Attack vector
Local
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

Weakness

CWE-276: Incorrect Default Permissions

During installation, installed file permissions are set to allow anyone to modify those files.

How to prevent it
  • Architecture and Design, Operation: The architecture needs to access and modification attributes for files to only those users who actually require those actions.
  • Architecture and Design: Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.

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 to prevent it
  • Implementation: When using a critical resource such as a configuration file, check to see if the resource has insecure permissions (such as being modifiable by any regular user) [REF-62], and generate an error or even exit the software if there is a possibility that the resource could have been modified by an unauthorized party.
  • Architecture and Design: Divide the software into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully defining distinct user groups, privileges, and/or roles. Map these against data, functionality, and the related resources. Then set the permissions accordingly. This will allow you to maintain more fine-grained control over your resources. [REF-207]
  • Architecture and Design, Operation: Run the code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software. OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. For example, java.io.FilePermission in the Java SecurityManager allows the software to specify restrictions on file operations. This may not be a feasible solution, and it only limits the impact to the operating system; the rest of the application may still be subject to compromise. Be careful to avoid CWE-243 and other weaknesses related to jails.
  • Implementation, Installation: During program startup, explicitly set the default permissions or umask to the most restrictive setting possible. Also set the appropriate permissions during program installation. This will prevent you from inheriting insecure permissions from any user who installs or runs the program.
  • System Configuration: For all configuration files, executables, and libraries, make sure that they are only readable and writable by the software's administrator.
  • Documentation: Do not suggest insecure configuration changes in documentation, especially if those configurations can extend to resources and other programs that are outside the scope of the application.
  • Installation: Do not assume that a system administrator will manually change the configuration to the settings that are recommended in the software's manual.
  • Operation, System Configuration: Ensure that the software runs properly under the United States Government Configuration Baseline (USGCB) [REF-199] or an equivalent hardening configuration guide, which many organizations use to limit the attack surface and potential risk of deployed software.
  • Implementation, System Configuration, Operation: When storing data in the cloud (e.g., S3 buckets, Azure blobs, Google Cloud Storage, etc.), use the provider's controls to disable public access.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-w828-4qhx-vxx3
Claude SDK for Python: Memory Tool Path Validation Race Condition Allows Sandbox Escape
Medium Also affects anthropic
CVE-2026-87886
Local privilege escalation due to insecure file permissions.
High Known exploited Same weakness, CWE-276
GHSA-6x7x-gcmf-7r8x
YesWiki vulnerable to unauthenticated arbitrary page deletion via `{{erasespamedcomments}}` action
Critical Same weakness, CWE-276
GHSA-rwp6-7w3q-75fq
OpenClaw: Config recovery could restore openclaw.json with broad file permissions
Medium Same weakness, CWE-276
GHSA-534h-c3cw-v3h9
Nuxt dev server vite-node IPC socket is world-connectable on Linux
Medium Same weakness, CWE-276
GHSA-99qx-5qqr-4j95
Apache ActiveMQ has an Incorrect Default Permissions vulnerability
High Same weakness, CWE-276
GHSA-vr7j-g7jv-h5mp
OpenClaw session transcript files were created without forced user-only permissions
Medium Same weakness, CWE-276
GHSA-crjq-wm6x-6qx7
.NET Elevation of Privilege Vulnerability
High Same weakness, CWE-276

Credits: gn00295120

Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor