{"id":"CVE-2026-34452","published":"2026-03-31T21:32:37Z","modified":"2026-04-03T16:08:25Z","title":"Claude SDK for Python: Memory Tool Path Validation Race Condition Allows Sandbox Escape","vendor":"anthropics","product":"anthropic-sdk-python","tier":"tail","description":{"text":"The Claude SDK for Python provides access to the Claude API from Python applications. From version 0.86.0 to before version 0.87.0, 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. This issue has been patched in version 0.87.0.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.8,"severity":"MEDIUM","version":"4.0","vector":"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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00147,"percentile":0.03967,"provenance":"source"},"cwes":[{"id":"CWE-59","name":"Improper Link Resolution Before File Access"},{"id":"CWE-367","name":"Time-of-check Time-of-use (TOCTOU) Race Condition"}],"references":[{"url":"https://github.com/anthropics/anthropic-sdk-python/security/advisories/GHSA-w828-4qhx-vxx3","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/anthropics/anthropic-sdk-python/commit/6599043eee6e86dce16953fcd1fd828052052be6","tags":["x_refsource_MISC"]},{"url":"https://github.com/anthropics/anthropic-sdk-python/releases/tag/v0.87.0","tags":["x_refsource_MISC"]}],"priority":{"score":4.9,"factors":[{"name":"EPSS percentile","points":0.79},{"name":"CVSS severity","points":4.06}]},"vendorSlug":"anthropics","affectedVersions":[{"vendor":"anthropics","product":"anthropic-sdk-python","versions":[">= 0.86.0, < 0.87.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-04-03T16:06:47.039006Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"anthropic","vulnerableRanges":[">=0.86.0, <0.87.0"],"patched":["0.87.0"],"from":["GHSA-w828-4qhx-vxx3","PYSEC-2026-2115"],"provenance":"source"}],"summary":{"text":"The Anthropic Python SDK (anthropic-sdk-python) has a race condition in its asynchronous local filesystem memory tool, which validates model-supplied paths but then uses the unresolved path for later file operations. An attacker with local access and write permission to the memory directory can retarget a symlink between the validation check and the file operation, letting reads or writes escape the sandboxed memory directory; the attack is hard to time reliably and requires low privileges, with no user interaction needed.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:20:43Z"},"euvd":{"id":"EUVD-2026-17681","exploited":false,"provenance":"source"}}