Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSend crafted message history to UI adapter endpoint
-
DeliveryEmbed dangling tool call in assistant-turn message
-
ExploitAppend client system message as trailing entry
-
Executionsanitize_messages drops system message, index off-by-one bypasses tool call inspection
-
PersistFramework dispatches tool call with attacker-supplied arguments
-
ImpactRegistered non-approval tool executes, bypassing model-request hooks
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Authorization logic validation
MITRE ATT&CK
1 technique across 1 tactic: Privilege Escalation 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 the target application uses one of the two affected UI adapters: the AG-UI adapter (instantiated via Agent.to_ag_ui() or AGUIAdapter) or the Vercel AI adapter (VercelAIAdapter). The triggering condition is the combination of a client-submitted system message trailing the message history (which is dropped under the default manage_system_prompt='server' setting) and a preceding assistant message containing an unresolved tool call. This default configuration is what most deployments will have, making the attack surface broadly applicable within the affected population. Exploitation is blocked if the targeted tool has requires_approval=True, since approval-gated tools are not dispatched by the auto-execute path. Applications that do not expose any UI adapter endpoint (using only the programmatic agent API) are entirely unaffected regardless of version. |
| Impact | The NVD CVSS vector AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N correctly captures that this is a network-reachable, zero-prerequisite attack with bounded impact. The CVSS score of 6.5 is reasonable: the actual blast radius is constrained by which registered tools the application exposes and what those tools can do - a deployment with only read-only or low-privilege tools faces limited real-world impact, while one exposing tools that modify data, call external APIs, or interact with infrastructure faces meaningfully higher risk. The most critical exploitation scenario targets applications that rely on before_model_request or after_model_request hooks as an authorization or content-filtering guardrail, since forged tool calls skip the model turn entirely and therefore bypass those hooks. No EPSS score was provided in the input data and no KEV listing exists, suggesting no confirmed widespread exploitation. The attack requires no special conditions against any application using the affected UI adapters under default configuration, making this a genuine medium-priority item for the affected population, despite the moderate base score. |
| Exploit ScenarioDerived | An attacker interacting with an application that exposes the AG-UI or Vercel AI streaming endpoint crafts a message history that includes an assistant-turn message with an unresolved tool call followed by a client system message. Under the default manage_system_prompt='server' policy, sanitize_messages drops the trailing system message, causing the off-by-one index error that leaves the dangling tool call uninspected at the new tail. The framework dispatches the tool with the attacker's chosen arguments - for example, calling a data-export or API-interaction tool with attacker-controlled parameters - without the model ever having produced that call. No public proof-of-concept code has been identified at time of analysis. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 29, 2026
Tool call injection in Pydantic AI's UI adapters (AG-UI via Agent.to_ag_ui()/AGUIAdapter, and Vercel AI via VercelAIAdapter) enables remote unauthenticated clients to force execution of registered server-side tools with attacker-supplied arguments, bypassing the framework's message-sanitization defense. The flaw affects pydantic-ai and pydantic-ai-slim versions 1.88.0-1.107.0 and 2.0.0b1-2.4.x. No public exploit code or CISA KEV listing exists at time of analysis, but the attack is low-complexity and exploitable against default configurations of applications using either UI adapter.
RemediationAI
The primary fix is to upgrade pydantic-ai or pydantic-ai-slim to version 1.107.1 (v1 branch) or 2.5.0 (v2 branch), as confirmed by the vendor advisory at https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-jpr8-2v3g-wgf9. If an immediate upgrade is not possible, annotate every registered tool that performs sensitive or state-modifying actions with requires_approval=True - this prevents auto-dispatch via the vulnerable path, though it adds user-interaction friction to the approval workflow. Alternatively, applications can temporarily avoid the AG-UI and Vercel AI adapters entirely and interact with the agent through the standard programmatic API, which is not affected by this sanitization flaw. Do not rely on model-request hooks (before_model_request / after_model_request) as a sole authorization control in affected versions, as forged tool calls bypass those hooks.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 4 packages in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Pydantic AI (CPE: cpe:2.3:a:pydantic:pydantic-ai:*:*:*:*:*:*:*:* and cpe:2.3:a:pydantic:pydantic-ai-slim:*:*:*:*:*:*:*:*) is a Python agent framework that wires LLM models to typed tool registries. Its AG-UI and Vercel AI adapters accept untrusted message histories from browser or streaming clients and are designed to scrub 'dangling' (unresolved, client-fabricated) tool calls via the sanitize_messages routine before forwarding history to the agent. The root cause is CWE-863 (Incorrect Authorization): the index used to anchor the sanitization pass was computed from the original message list length before any messages were dropped. When the default manage_system_prompt='server' policy caused a trailing client-submitted system message to be discarded during sanitization, the list shrank by one, and the preceding assistant message carrying an unresolved tool call became the new tail - at an index the sanitizer had already passed. The framework then dispatched that tool call as legitimate model output, skipping authorization checks entirely. Approval-gated tools (requires_approval=True) are handled by a separate pathway and are not affected.
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:L/PR:N/UI:N/S:U/C:L/I:L/A:N
Network-reachable with no authentication under default adapter config; impact bounded to low C/I since tool registry scope limits blast radius and no availability impact applies.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
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.
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
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
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
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
A domain-denylist bypass in Pydantic AI's local web-fetch tooling (web_fetch_tool and the WebFetch local fallback) lets
EUVD-2026-50555
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB