CVE-2026-34452: Claude SDK for Python Memory Tool Path Validation Race Vulnerability
MODERATECVE-2026-34452 is a MODERATE (CVSS 5.3) memory tool path validation race vulnerability (CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition) affecting Claude SDK for Python libraries in the PyPI ecosystem. The issue involves memory tool path validation race condition allows sandbox escape. Remediation is available by upgrading affected packages to version 0.87.0.
CVE-2026-34452 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:N).
How to Fix CVE-2026-34452
To remediate this vulnerability, upgrade all affected Claude SDK for Python dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install anthropic>=0.87.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show anthropic
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-34452, inspect your installed packages using pip:
pip show anthropic
Analyze the terminal output to locate any version of Claude SDK for Python in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.87.0), your application is affected.
Note: The pip show anthropic command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition, where the product checks the state of a resource before using that resource, but the resource's state can change between the check and the use in a way that invalidates the results of the check. In Claude SDK for Python, 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
CVE-2026-34452 Affected Claude SDK for Python Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
anthropic
|
PyPI |
≥ 0.86.0
< 0.87.0
|
0.87.0
|
References
Frequently Asked Questions
What is CVE-2026-34452?
Which Claude SDK for Python versions are affected?
What version fixes CVE-2026-34452?
Is anthropic affected?
What is the CVSS score of CVE-2026-34452?
What CWE is associated with CVE-2026-34452?
How can I check PyPI dependencies for CVE-2026-34452?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w828-4qhx-vxx3",
"modified" : "2026-04-24T20:59:08Z",
"published" : "2026-04-01T21:17:34Z",
"aliases" : [ "CVE-2026-34452" ],
"summary" : "Claude SDK for Python: Memory Tool Path Validation Race Condition Allows Sandbox Escape",
"details" : "The async local filesystem memory tool in the Anthropic Python SDK validated that model-supplied paths resolved inside the sandboxed memory directory, but then returned the unresolved path for subsequent file operations. A local attacker able to write to the memory directory could retarget a symlink between validation and use, causing reads or writes to escape the sandbox. The synchronous memory tool implementation was not affected.\n\nUsers on the affected versions are advised to update to the latest version.\n\nClaude SDK for Python thanks [hackerone.com/kasthelord](https://hackerone.com/kasthelord) for reporting this issue!",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "anthropic"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.86.0"
}, {
"fixed" : "0.87.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/anthropics/anthropic-sdk-python/security/advisories/GHSA-w828-4qhx-vxx3"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-34452"
}, {
"type" : "WEB",
"url" : "https://github.com/anthropics/anthropic-sdk-python/commit/6599043eee6e86dce16953fcd1fd828052052be6"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/anthropics/anthropic-sdk-python"
}, {
"type" : "WEB",
"url" : "https://github.com/anthropics/anthropic-sdk-python/releases/tag/v0.87.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-367", "CWE-59" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-01T21:17:34Z",
"nvd_published_at" : "2026-03-31T22:16:20Z"
}
}