# Claude SDK for Python: Memory Tool Path Validation Race Condition Allows Sandbox Escape

Advisory record · `GHSA-w828-4qhx-vxx3`

- **Identifiers:** `GHSA-w828-4qhx-vxx3` · `CVE-2026-34452` · `PYSEC-2026-2115`
- **State:** Confirmed
- **Severity:** CVSS 5.8 Medium
- **Critical:** No
- **Weakness (CWE):** [CWE-59](https://cwe.mitre.org/data/definitions/59.html) · [CWE-367](https://cwe.mitre.org/data/definitions/367.html)
- **Tags:** [Path traversal](https://agentprime.io/advisories/tag/path-traversal.md) · [Race condition](https://agentprime.io/advisories/tag/race-condition.md)
- **Published:** 1 Apr 2026
- **Updated:** 10 Sept 2026
- **Reviewed by a person:** No

Published by the GitHub Advisory Database at 1 Apr 2026, 21:17 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

## Affected packages

- `anthropic` (PyPI): affected `>=0.86.0, <0.87.0`; fixed in `0.87.0`

## Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

> The anthropic Python SDK versions 0.86.0 up to but not including 0.87.0 contain a race condition in the async local filesystem memory tool, where paths were validated but an unresolved path was used afterward. A local attacker who can write to the memory directory could swap a symlink between validation and use, allowing reads or writes outside the sandbox. Upgrade to anthropic 0.87.0 or later; the synchronous memory tool was not affected.

Written 1 Nov 2026.

## Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

## Severity and exploitation

- 5.8 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`, from CNA (GitHub_M)

- **CISA KEV:** Not listed.
- **EPSS:** 0.0015, the 3rd percentile, on 17 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

## Timeline

- 31 Oct 2026, 14:11 UTC: First seen by agentprime
- 31 Oct 2026, 14:11 UTC: [Confirmed by OSV](https://osv.dev/vulnerability/GHSA-w828-4qhx-vxx3)

## Sources

- [GitHub Advisory Database: GHSA-w828-4qhx-vxx3](https://github.com/advisories/GHSA-w828-4qhx-vxx3)
- [OSV: GHSA-w828-4qhx-vxx3](https://osv.dev/vulnerability/GHSA-w828-4qhx-vxx3)
- <https://github.com/anthropics/anthropic-sdk-python/security/advisories/GHSA-w828-4qhx-vxx3>
- <https://nvd.nist.gov/vuln/detail/CVE-2026-34452>
- <https://github.com/anthropics/anthropic-sdk-python/commit/6599043eee6e86dce16953fcd1fd828052052be6>
- <https://github.com/anthropics/anthropic-sdk-python>
- <https://github.com/anthropics/anthropic-sdk-python/releases/tag/v0.87.0>

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.

## Check whether this affects you

A Match means an installed version is in the affected range above. Most don’t affect the app; agentprime hasn’t analysed this one yet.

- With the agentprime MCP server (<https://api.agentprime.io/mcp>), ask your agent to check the project: `check_lockfile` sends a lockfile, `check_packages` a list of installed packages, and both return the Matches and the upgrades that clear them. `get_advisory` returns this record. Setup: <https://agentprime.io/mcp.md>
- In a browser: <https://agentprime.io/check/> reads your lockfile in the browser, never uploading it.
- Whether it touches your code, with file and line: the Claude Code plugin, <https://agentprime.io/plugin.md>
- As JSON: <https://api.agentprime.io/v1/advisories/GHSA-w828-4qhx-vxx3>, or `POST https://api.agentprime.io/v1/match` with your packages (<https://agentprime.io/api.md>)

---

The web page: <https://agentprime.io/advisories/GHSA-w828-4qhx-vxx3/>. Everything for agents: <https://agentprime.io/llms.txt>.
