Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-65975— Pydantic AI AG-UI Adapter: A dangling client-submitted tool call can execute when a trailing message is dropped during `sanitize_messages`

Quick assessment

Affected
pydantic pydantic-ai
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Pydantic pydantic-ai是Pydantic组织开源的一个用于构建生产级应用程序和工作流的生成式AI框架。 pydantic-ai 1.88.0版本至1.107.1之前版本和2.0.0b1版本至2.5.0之前版本存在授权问题漏洞,该漏洞源于UI适配器中sanitize_messages清理逻辑存在缺陷,可能导致远程客户端绕过安全检查,使非审批服务器工具以客户端提供的参数执行。

CVSS 6.5 · Medium EPSS 0.33% · P24

Possible ATT&CK Techniques 1 AI

T1190 · Exploit Public-Facing Application

Affected Version Matrix 4

VendorProduct Version RangeStatus
pydantic pydantic-ai >= 1.88.0, < 1.107.1 affected
>= 2.0.0b1, < 2.5.0 affected
pydantic pydantic-ai-slim >= 1.88.0, < 1.107.1 affected
>= 2.0.0b1, < 2.5.0 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-65975

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
Pydantic AI AG-UI Adapter: A dangling client-submitted tool call can execute when a trailing message is dropped during `sanitize_messages`
Source: CVE Program / CVE List V5
Vulnerability 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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
Source: CVE Program / CVE List V5
Vulnerability Type
授权机制不正确
Source: CVE Program / CVE List V5
Vulnerability Title
pydantic-ai 授权问题漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Pydantic pydantic-ai是Pydantic组织开源的一个用于构建生产级应用程序和工作流的生成式AI框架。 pydantic-ai 1.88.0版本至1.107.1之前版本和2.0.0b1版本至2.5.0之前版本存在授权问题漏洞,该漏洞源于UI适配器中sanitize_messages清理逻辑存在缺陷,可能导致远程客户端绕过安全检查,使非审批服务器工具以客户端提供的参数执行。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
pydantic pydantic-ai >= 1.88.0, < 1.107.1 -
pydantic pydantic-ai-slim >= 1.88.0, < 1.107.1 -

II. Public POCs for CVE-2026-65975

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-65975

请登录查看更多情报信息。

Vendor Advisories for CVE-2026-65975 (1)

Same Patch Batch · pydantic · 2026-07-29 · 3 CVEs total

CVE-2026-46678 6.8 MEDIUM Pydantic AI: SSRF cloud-metadata blocklist bypass via IPv4-mapped IPv6 (Incomplete fix of
CVE-2026-54249 6.8 MEDIUM VercelAIAdapter trusts client-controlled `providerMetadata` to construct `UploadedFile` —

IV. Related Vulnerabilities

V. Comments for CVE-2026-65975

No comments yet


Leave a comment