CVE-2026-133505pydantic-ai Access of Resource Using Incompatible Type ('Type Confusion')
NVDCVSS scored by 7cec5f2f-3032-4006-8740-31f605ffab5f
Vulnerability Summary
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.
CVSS v3.1 Base Metrics — Score 5.9 (MEDIUM)
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:NAttack VectorNetwork
Attack ComplexityHigh
Privileges RequiredNone
User InteractionNone
ScopeUnchanged
ConfidentialityHigh
IntegrityNone
AvailabilityNone
Affected & Patched Versions
- pydantic-ai >= 1.50.0 and <= 1.107.9
- pydantic-ai >= 2.0.0b1 and <= 2.65.0
- pydantic-ai-slim >= 1.50.0 and <= 1.107.9
- pydantic-ai-slim >= 2.0.0b1 and <= 2.65.0
- pydantic-ai 1.107.9
- pydantic-ai 2.65.0
- pydantic-ai-slim 1.107.9
- pydantic-ai-slim 2.65.0
What to do
Fix it during your normal patch cycle. No exploitation is confirmed yet.
- Check whether you run pydantic-ai and which version.
- Update to a patched version listed above, then confirm the new version.
Timeline
- Nov 20, 2026Published
- Nov 23, 2026Record last modified
Score, severity and exploitation changes are tracked from the day Watchtower started logging them.
Get notified about new pydantic-ai CVEsYou are reading CVE-2026-133505. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alertsExternal References
Data last checked: Nov 20, 2026 08:01 UTC