{"id":"CVE-2026-133505","aliases":["GHSA-4cj4-hgwf-4hc4"],"title":"Tool result data shaped like a file is rebuilt as a file download or provider file reference when message history is reloaded","originalDescription":"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.","severity":{"cvss":5.9,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","label":"medium"},"exploitation":{"kev":null,"epss":{"score":0.00423,"percentile":0.28265},"exploitDb":null},"affected":[],"references":[{"url":"https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-4cj4-hgwf-4hc4","type":"vendor-advisory"},{"url":"https://pydantic.dev/docs/ai/ui/overview/#trust-model-for-client-submitted-messages","type":"other"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/133xxx/CVE-2026-133505.json","type":"advisory"},{"url":"https://github.com/pydantic/pydantic-ai","type":"package"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-133505","type":"advisory"},{"url":"https://pypi.org","type":"web"}],"sources":[{"name":"nvd","at":"2026-11-23T15:56:08.102Z","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-133505","license":"NVD terms of use","firstSeenAt":"2026-11-20T08:42:44.584Z"},{"name":"osv","at":"2026-11-21T21:34:33.787Z","url":"https://osv.dev/vulnerability/CVE-2026-133505","license":"CC-BY 4.0","firstSeenAt":"2026-11-20T09:16:13.377Z"},{"name":"cvelistV5","at":"2026-11-23T21:31:31.509Z","url":"https://www.cve.org/CVERecord?id=CVE-2026-133505","license":"CVE Terms of Use","firstSeenAt":"2026-11-20T08:07:12.775Z"}],"firstSeenAt":"2026-11-20T08:07:12.775Z","publishedAt":"2026-11-20T07:34:58.052Z","modifiedAt":"2026-11-23T15:41:46.570Z"}