CVE-2026-65975
Published:July 29, 2026
Updated:August 04, 2026
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.
Affected Packages
pydantic-ai (CONDA):
Affected version(s) >=2.0.0 <2.5.0Fix Suggestion:
Update to version 2.5.0pydantic-ai-slim (CONDA):
Affected version(s) >=2.0.0 <2.5.0Fix Suggestion:
Update to version 2.5.0pydantic-ai (CONDA):
Affected version(s) >=1.88.0 <1.107.1Fix Suggestion:
Update to version 1.107.1pydantic-ai-slim (CONDA):
Affected version(s) >=1.88.0 <1.107.1Fix Suggestion:
Update to version 1.107.1https://github.com/pydantic/pydantic-ai.git (GITHUB):
Affected version(s) >=v1.88.0 <v1.107.1Fix Suggestion:
Update to version v1.107.1pydantic-ai (PYTHON):
Affected version(s) >=1.88.0 <1.107.1Fix Suggestion:
Update to version 1.107.1pydantic-ai-slim (PYTHON):
Affected version(s) >=2.0.0b1 <2.5.0Fix Suggestion:
Update to version 2.5.0pydantic-ai (PYTHON):
Affected version(s) >=2.0.0b1 <2.5.0Fix Suggestion:
Update to version 2.5.0pydantic-ai-slim (PYTHON):
Affected version(s) >=1.88.0 <1.107.1Fix Suggestion:
Update to version 1.107.1Related Resources (3)
Do you need more information?
Contact UsCVSS v4
Base Score:
6.9
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
NONE
Vulnerable System Confidentiality
LOW
Vulnerable System Integrity
LOW
Vulnerable System Availability
NONE
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
6.5
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
LOW
Integrity
LOW
Availability
NONE
Weakness Type (CWE)
Incorrect Authorization
EPSS
Base Score:
0.21