5.8medium
Claude SDK for Python: Memory Tool Path Validation Race Condition Allows Sandbox Escape
- Severity
- 5.8medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.15% (higher than 4% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-w828-4qhx-vxx3PYSEC-2026-2115
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| anthropics anthropic-sdk-python | >= 0.86.0, < 0.87.0 | CVE List |
| anthropic (PyPI) | from 0.86.0 before 0.87.0 | GitHub Advisory Database, PyPA Advisory Database |
| anthropic claude_sdk_for_python | from 0.86.0 before 0.87.0 | NVD |
All scores
| GitHub_M | 5.8medium CVSS:4.0 | 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 |
| GitHub | 5.3medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:N |
| GitHub | medium CVSS:4.0 | 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 |
| NVD | 5.3medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:N |
| PyPA Advisory Database | 5.3medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:N |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
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!
NVD (es)
El SDK de Claude para Python proporciona acceso a la API de Claude desde aplicaciones Python. Desde la versión 0.86.0 hasta antes de la versión 0.87.0, la herramienta de memoria asíncrona del sistema de archivos local en el SDK de Python de Anthropic validaba que las rutas proporcionadas por el modelo se resolvían dentro del directorio de memoria en sandbox, pero luego devolvía la ruta sin resolver para operaciones de archivo posteriores. Un atacante local capaz de escribir en el directorio de memoria podría redirigir un enlace simbólico entre la validación y el uso, lo que provocaría que las lecturas o escrituras escaparan del sandbox. La implementación de la herramienta de memoria síncrona no se vio afectada. Este problema ha sido parcheado en la versión 0.87.0.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-34452 changed 2026-04-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-w828-4qhx-vxx3 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2026-34452 changed 2026-07-24 | Public domain |
| PyPA Advisory Database | PYSEC-2026-2115 changed 2026-07-13 | CC-BY-4.0 |