Skip to content
Heist/ feed
Back to feed
Medium

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

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-34452
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 00:55 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 31 Mar 2026, 21:32 UTC

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.

osv:CVE-2026-34452
Complete source record
{
  "id": "8189acf9e4b3195a695962d058b6be185149e9e044231682ed1896fde1e41d29",
  "url": "https://osv.dev/vulnerability/CVE-2026-34452",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Claude SDK for Python: Memory Tool Path Validation Race Condition Allows Sandbox Escape",
    "summary": "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.",
    "evidence": "osv:CVE-2026-34452",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-34452",
      "aliases": [
        "CVE-2026-34452",
        "GHSA-w828-4qhx-vxx3",
        "PYSEC-2026-2115"
      ],
      "metrics": [
        {
          "type": "CVSS_V4",
          "score": "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"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/anthropics/anthropic-sdk-python",
              "type": "GIT",
              "events": [
                {
                  "introduced": "d7c0974ce6ab94ca135b10b2a45308203c0e0c7e"
                },
                {
                  "fixed": "ab0c4460a170183ff036e2a3dad320ac4ac2c76d"
                },
                {
                  "fixed": "6599043eee6e86dce16953fcd1fd828052052be6"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:anthropic:claude_sdk_for_python:*:*:*:*:*:python:*:*",
                    "range": [
                      {
                        "introduced": "0.86.0"
                      },
                      {
                        "fixed": "0.87.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "6599043eee6e86dce16953fcd1fd828052052be6"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "ab0c4460a170183ff036e2a3dad320ac4ac2c76d"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v0.87.0"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v0.86.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-34452.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:24.887162369Z",
      "provider": "osv",
      "references": [
        "https://github.com/anthropics/anthropic-sdk-python/releases/tag/v0.87.0",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/34xxx/CVE-2026-34452.json",
        "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"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-367",
          "CWE-59"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/34xxx/CVE-2026-34452.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-34452",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 491381,
  "published_at": "2026-03-31T21:32:37.537+00:00"
}