Intel

AIKIDO-2026-680513

pydantic-ai-slim is vulnerable to Incorrect Authorization

CVE-2026-65975Published Jul 22, 2026
July 22, 2026

65

CVE Score

Medium

Incorrect Authorization

Are you affected? Scan for Free

TL;DR

Pydantic AI's UI adapters (AGUIAdapter and VercelAIAdapter) sanitize untrusted, client-submitted message history through UIAdapter.sanitize_messages before it reaches the agent, stripping unresolved dangling tool calls from the trailing response by default. The strip anchored to a message index computed before sanitization ran, so when a trailing client message sanitized to empty and was dropped, a preceding assistant response carrying an unresolved client-submitted tool call became the new tail and was dispatched unchecked. A remote client can use this to make a registered non-approval tool execute with attacker-supplied, schema-valid arguments, bypassing execution guardrails placed in model-request hooks. The fix moves the strip to a post-pass over the already-sanitized history so dangling tool calls are removed from whichever response actually survives as the tail.

How do I fix this?

Upgrade the pydantic-ai-slim and/or the pydantic-ai library to the patch version.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and serve an agent over a UI adapter (AG-UI or Vercel AI) in its default configuration.

Versions

1.88.0 - 1.107.0

Fixed in 1.107.1

2.0.0 - 2.4.0

Fixed in 2.5.0

Background info

pydantic-ai-slim is vulnerable to Incorrect Authorization in versions 1.88.0 - 1.107.0 and 2.0.0 - 2.4.0.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea