{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "1.50.0"
                  },
                  {
                    "last_affected": "1.107.9"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              },
              {
                "range": [
                  {
                    "introduced": "2.0.0b1"
                  },
                  {
                    "last_affected": "2.65.0"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              }
            ]
          },
          "events": [
            {
              "introduced": "7929901e0ccf687d8c2c1451d08432317e719cd5"
            },
            {
              "last_affected": "172d665f2b15ff7dce3877fac55ae2f96b0f325a"
            },
            {
              "introduced": "6001a4549018ad5509f2c11ed6c38d2385159506"
            },
            {
              "last_affected": "a56a6d6f138d1e3a9c45a9697ea513bef47a6cea"
            }
          ],
          "repo": "https://github.com/pydantic/pydantic-ai",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-4cj4-hgwf-4hc4"
  ],
  "database_specific": {
    "cna_assigner": "Pydantic",
    "cwe_ids": [
      "CWE-843",
      "CWE-918"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/133xxx/CVE-2026-133505.json"
  },
  "details": "When message history is serialized and loaded again, a tool result that contains a JSON object in the serialized shape of one of Pydantic AI's file types is rebuilt as that file. A third party who controls data a tool returns, such as a record that an MCP server or a function tool returns from an external system, can use this to make the application download a URL on its local network, or make the model provider read an s3:// object or uploaded file with the application's credentials. Applications are affected when tool results can contain third-party data, message history containing those results is serialized and loaded again (stored history, history a UI adapter holds on the server, or Temporal, DBOS or Prefect durable execution), and the model is one Pydantic AI downloads files for, one that honors force_download, or one whose provider resolves non-HTTP file URLs or uploaded files. History that a client submits through the Vercel AI or AG-UI adapter in the default mode is not affected. The issue is fixed in pydantic-ai and pydantic-ai-slim 1.107.10 and 2.66.0.",
  "id": "CVE-2026-133505",
  "modified": "2026-11-20T08:45:42.055644464Z",
  "published": "2026-11-20T07:34:58.052Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/133xxx/CVE-2026-133505.json"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/pydantic/pydantic-ai"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-4cj4-hgwf-4hc4"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-133505"
    },
    {
      "type": "WEB",
      "url": "https://pydantic.dev/docs/ai/ui/overview/#trust-model-for-client-submitted-messages"
    },
    {
      "type": "WEB",
      "url": "https://pypi.org"
    }
  ],
  "schema_version": "1.9.2",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Tool result data shaped like a file is rebuilt as a file download or provider file reference when message history is reloaded"
}