Impact
The vulnerability lies in the misuse of a message sanitizer that removes unresolved client-supplied tool calls but relies on a message index calculated before sanitization. When a client sends a trailing message that sanitizes to an empty string, the next message—an assistant response with an unresolved tool call—becomes the terminal message and is dispatched without inspection. This allows a remote client to trigger a registered non-approval server tool with arbitrary arguments supplied by the client, bypassing the model-request guardrails. The impact is confined to the capabilities of the affected tools; if the tool performs privileged actions, the flaw can lead to unauthorized tool execution or similar damage.
Affected Systems
The affected products are the Pydantic AI framework, specifically the pydantic-ai and pydantic-ai‑slim packages. Versions 1.88.0 through 1.107.0, and 2.0.0b1 through 2.4.9 are impacted. All other released versions are considered safe.
Risk and Exploitability
The CVSS score of 6.5 indicates moderate severity, while the EPSS score of less than 1% suggests a low probability of widespread exploitation. The vulnerability is not listed in the CISA KEV catalog. Exploitability requires a legitimate endpoint that accepts client messages via the AG‑UI or Vercel AI adapters, and the attacker must craft a message that sanitizes to nothing to make a prior assistant tool call the new tail. If the tool is flagged with requires_approval=True, the flaw does not auto‑execute it, mitigating the risk in that scenario.
OpenCVE Enrichment