CVE-2026-34452: Claude SDK for Python: Memory Tool Path Validation Race Condition Allows Sandbox Escape
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.
Users on the affected versions are advised to update to the latest version.
Claude SDK for Python thanks hackerone.com/kasthelord for reporting this issue!
Other sources
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.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/anthropicto a version that resolves this vulnerability.Fixed in 0.87.0 - Upgrade
Upgrade
Anthropic Claude SDK for Python (async local filesystem memory tool)to a version that resolves this vulnerability.Fixed in 0.87.0
Event History
Frequently Asked Questions
What is the severity of CVE-2026-34452?
CVE-2026-34452 has been classified as a medium severity vulnerability due to its potential for sandbox escape.
How do I fix CVE-2026-34452?
To fix CVE-2026-34452, update the Claude SDK for Python to version 0.87.0 or later.
What versions of the Claude SDK for Python are affected by CVE-2026-34452?
CVE-2026-34452 affects Claude SDK for Python versions from 0.86.0 to before 0.87.0.
What kind of vulnerability is CVE-2026-34452?
CVE-2026-34452 is a race condition vulnerability related to memory tool path validation.
Can CVE-2026-34452 lead to remote code execution?
Yes, CVE-2026-34452 may allow an attacker to bypass sandbox restrictions and execute arbitrary code.