Claude SDK for Python: Memory Tool Path Validation Race Condition Allows Sandbox Escape
Moderate severity
GitHub Reviewed
Published
Mar 31, 2026
in
anthropics/anthropic-sdk-python
•
Updated Apr 24, 2026
Description
Published by the National Vulnerability Database
Mar 31, 2026
Published to the GitHub Advisory Database
Apr 1, 2026
Reviewed
Apr 1, 2026
Last updated
Apr 24, 2026
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!
References