CVE-2026-65975 Details
Description
Pydantic AI is a Python agent framework for building applications and workflows with Generative AI. In versions 1.88.0 up to but not including 1.107.1 and 2.0.0b1 up to but not including 2.5.0, the UI adapters (AG-UI via Agent.to_ag_ui()/AGUIAdapter, and Vercel AI via VercelAIAdapter) use sanitize_messages to strip unresolved ("dangling") client-submitted tool calls from untrusted message history before it reaches the agent, a defense-in-depth default that prevents the agent from executing tool calls the model never emitted. However, the strip anchored to a message index computed before sanitization ran, so when a trailing client message sanitized to empty and was dropped (for example a client system message under the default manage_system_prompt='server'), a preceding assistant response carrying an unresolved tool call became the new tail and was dispatched without inspection. As a result, a remote client could cause a registered, non-approval server tool to run with client-supplied arguments rather than arguments the model produced. The impact is bounded by what the affected tools do and is most significant for applications that gate tool execution in a model-request hook (before_model_request / after_model_request), since a forged call skips the model turn and bypasses that guardrail; approval-gated tools (requires_approval=True) are not auto-executed by this path. This issue has been fixed in versions 1.107.1 and 2.5.0.
A vulnerability exists in Pydantic AI, specifically within the UI adapters AG-UI and Vercel AI, in versions 1.88.0 prior to 1.107.1 and 2.0.0b1 prior to 2.5.0. The issue arises because the UI adapters use a message sanitization process that fails to properly handle unresolved client-submitted tool calls. When a trailing client message is sanitized to empty and dropped, any preceding assistant response containing an unresolved tool call can be re-exposed and executed without proper inspection. This flaw allows remote clients to manipulate tool execution with custom arguments, bypassing intended safeguards, particularly in applications that rely on model-request hooks to manage tool calls. The vulnerability has been addressed in Pydantic AI versions 1.107.1 and 2.5.0.
Users can upgrade to Pydantic AI version 2.5.0 or later, or to the corresponding patched version 1 release. For those using unpatched versions, it is recommended to enforce tool-level authorization inside the tool handler and to place any tool-execution guardrails in the 'before_tool_execute' hook, which is not bypassed by promptless calls.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jul 30, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-jpr8-2v3g-wgf9 | [email protected] | Vendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-863 | Incorrect Authorization | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| pydantic pydantic ai | >= 1.88.0, < 1.107.1 >= 2.0.0, < 2.5.0 |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Aug 4, 2026 | Initial Analysis | [email protected] |
| Jul 30, 2026 | CVE Modified | CISA-ADP |
| Jul 29, 2026 | New CVE Received | [email protected] |