Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessControl third-party data returned by a tool
-
DeliveryEmbed JSON shaped like a Pydantic AI file item
-
ExploitMessage history serialized and reloaded
-
ExecutionMapping rebuilt as DocumentUrl/UploadedFile
-
PersistNext model request downloads local URL or reads credentialed object
-
ImpactExfiltrate content via attacker-controlled tool output
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Type safety enforcement
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that tool results can carry third-party-controlled data (for example JSON an MCP server or external API returns unchanged through a function tool), AND that message history containing those results is serialized and loaded again - via stored history (ModelMessagesTypeAdapter), server-held UI-adapter history (manage_message_history='server'), or Temporal/DBOS/Prefect durable execution - AND that the model in use is one Pydantic AI downloads files for, one that honors force_download, or one whose provider resolves non-HTTP file URLs or uploaded files. Local-network download specifically requires a DocumentUrl/ImageUrl rebuilt with force_download='allow-local' (cloud metadata addresses remain blocked). Limiting factors that reduce real-world exposure: history that a client submits through the Vercel AI or AG-UI adapter in default mode is NOT affected because sanitize_messages() resets force_download and drops non-HTTP URLs and uploaded files; and affected versions are pydantic-ai/pydantic-ai-slim >=1.50.0,<=1.107.9 and >=2.0.0b1,<=2.65.0. Exfiltration of downloaded document text further depends on the attacker being able to induce the model to repeat the content to a channel they control. |
| Impact | This is a moderate, conditional risk rather than a drop-everything emergency, and the signals are internally consistent on that point. The CVSS 3.1 vector (AV:N/AC:H/PR:N/UI:N, C:H/I:N/A:N, 5.9 Medium) captures a network-reachable, no-user-interaction flaw whose AC:H reflects the chain of specific preconditions required (history serialization plus reload plus a file-downloading/non-HTTP-resolving model). PR:N is appropriate because the assumed attacker is a third party with no application access who merely controls data a trusted tool returns (e.g., an MCP server or external API record) - it is not an authenticated application user. CWE here is type confusion (CWE-843), and the GHSA adds CWE-918 (SSRF), which matches the impact: internal-URL fetches and credentialed s3:///gs:// or uploaded-file reads. There is no CISA KEV listing and no EPSS score in the input, so there is no evidence of active or widespread exploitation; status is no public exploit identified at time of analysis. The vuln.today decision label is this_month, not act_now or emergency, consistent with a vendor-reported issue that is serious for a specific deployment shape but not mass-exploitable. The main caveat for prioritization is that real risk is highly architecture-dependent: only applications matching all of the serialize-reload-plus-file-model conditions are exposed, so blanket high-urgency treatment would overstate it while ignoring it in a qualifying architecture would understate it. EPSS and KEV data are absent and should be checked before final triage. |
| Exploit ScenarioDerived | An attacker who controls data returned by an MCP server or an external API (whose JSON a function tool returns unchanged) embeds a mapping shaped exactly like a Pydantic AI file item such as a DocumentUrl pointing at an internal-network URL, or an UploadedFile/s3:// reference. The model initially sees this only as JSON text, but once the message history is serialized and loaded again (stored history, server-held UI-adapter history, or Temporal/DBOS/Prefect durable execution), Pydantic AI rebuilds the mapping as a real file, so the next model request downloads the local URL or has the provider resolve the object using the application's credentials; the attacker recovers the content by inducing the model to repeat it to a tool they control. No public exploit is identified at time of analysis, and no injected instructions are needed - only a subsequent model request. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 20, 2026
Deserialization type confusion in Pydantic AI (pydantic-ai and pydantic-ai-slim) lets third-party-controlled tool result data be rebuilt as a file object when serialized message history is loaded again, so the application then downloads an attacker-named URL on its local network or the model provider reads an s3:// object or uploaded file using the application's credentials. Affected versions are >=1.50.0 through <=1.107.9 and >=2.0.0b1 through <=2.65.0; exploitation requires that tool results can carry untrusted data, that history containing them is serialized and reloaded (stored history, server-held UI adapter history, or Temporal/DBOS/Prefect durable execution), and that the model in use is one Pydantic AI downloads files for, one that honors force_download, or one whose provider resolves non-HTTP file URLs or uploaded files, making this a conditional confidentiality-only issue scored 5.9 (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N) with no public exploit identified at time of analysis. Fixed in 1.107.10 and 2.66.0.
RemediationAI
Vendor-released patch: upgrade to pydantic-ai / pydantic-ai-slim 1.107.10 (1.x branch) or 2.66.0 (2.x branch); both are listed as fixed versions and older releases ignore the new provenance record, so rolling upgrades of durable-execution workers are safe and in-flight runs keep their files. Where upgrading is not immediately possible: run sanitize_messages() on stored history before reusing it, which resets force_download on file URLs in tool results and drops uploaded-file references and non-HTTP URLs - note it also applies its other untrusted-history rules, such as removing unresolved tool calls at the end, so check those against how your application resumes runs; and have function tools return third-party data as a JSON string (for example pydantic_core.to_json(data).decode()) rather than as a dict or list, since a string is never rebuilt as a file - this changes how tools consume such data downstream. To audit already-stored history, look for tool-return content containing "kind" values such as "document-url", "image-url" or "uploaded-file" that your own tools did not produce, especially with "force_download" set or a non-HTTP "url". If you stored history yourself and fully trust its contents, load it with ModelMessagesTypeAdapter.validate_json(data, context={'pydantic_ai': {'rebuild_unrecorded_tool_files': True}}) (or validate_python) to restore the previous file-rebuild behavior, then save it again so it carries the record; only do this for history no third party could have shaped, because it restores the earlier behavior for any lookalike already present. For Temporal/DBOS/Prefect journals, harness step persistence, saved conversations and delegated-task records that may contain tool results built from third-party data, finish or discard runs started before the upgrade rather than continuing them, or sanitize the history first.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-843 (access of a resource using an incompatible type), with an SSRF-style consequence also tracked as CWE-918. Pydantic AI rebuilds file items - ImageUrl, DocumentUrl, AudioUrl, VideoUrl and UploadedFile - nested inside tool results when message history is deserialized, so that genuine files a tool returned survive a round trip. The check was shape-based rather than provenance-based: a plain mapping returned by a tool that serializes to the same JSON as one of those file items was rebuilt as a file too. During the original run the model received the mapping as JSON text; after reload it becomes a file that the next model request downloads or references. The relevant serialization boundaries are ModelMessagesTypeAdapter-based stored history, UI adapter history held server-side with manage_message_history='server', and Temporal, DBOS or Prefect durable execution, which serialize tool results between steps within a single run. The fix records which file items a tool result actually held at serialization time, outside the tool's data, and rebuilds only those; legacy history without that record rebuilds lookalikes only as HTTP(S) URLs with force_download reset, and keeps UploadedFile and non-HTTP URLs as plain mappings. The assessed vector (AC:H) reflects that the attacker cannot directly reach the flaw and must win a chain of preconditions rather than a single request.
Know when Pydantic Ai gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
A remote third party controlling tool-returned data needs no application privileges (PR:N) but depends on multiple preconditions - serialize/reload plus a file-resolving model - so AC:H; impact is credentialed read/SSRF disclosure, hence C:H, I:N, A:N.
Primary rating from Vendor (Pydantic).
CVSS VectorVendor: Pydantic
DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
More in Pydantic Ai
View allPydantic AI versions 0.0.26 through 1.55.x contain a server-side request forgery vulnerability in URL download functiona
Cross-site request forgery in Pydantic AI's development web chat UI allows any website a developer happens to visit whil
Concurrency slot exhaustion in Pydantic AI 2.10.0 through 2.52.x lets streamed model requests permanently occupy slots i
Server-Side Request Forgery in Pydantic AI (versions 1.56.0-1.101.0, 2.0.0b1, 2.0.0b2) allows unauthenticated network at
Server-side request forgery in Pydantic AI's URL-fetching guards lets an application that has explicitly opted a URL int
Server-Side Request Forgery in Pydantic AI's UI adapter layer (versions 1.65.0-1.105.0 and 2.0.0b1-2.0.0b5) allows unaut
Pydantic AI, a Python framework for building Generative AI agents, buffers complete HTTP response bodies before applying
Denial of service in Pydantic AI (pydantic-ai and pydantic-ai-slim) versions 1.77.0 through 1.107.5 and 2.0.0b1 through
Denial of service in Pydantic AI's local web_fetch_tool and WebFetch local fallback allows an attacker-controlled HTML p
Tool call injection in Pydantic AI's UI adapters (AG-UI via Agent.to_ag_ui()/AGUIAdapter, and Vercel AI via VercelAIAdap
DNS rebinding against the Pydantic AI development web chat server (Agent.to_web() and `clai web`) lets a hostile website
Pydantic AI versions 1.34.0 through 1.50.x contain a path traversal vulnerability in the web UI that allows unauthentica
EUVD-2026-131095
GHSA-jvv4-fh7q-4c38
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB