CVE-2026-65975

Source
https://cve.org/CVERecord?id=CVE-2026-65975
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-65975.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-65975
Aliases
  • GHSA-jpr8-2v3g-wgf9
Published
2026-07-29T20:06:09.177Z
Modified
2026-07-30T04:03:27.811106208Z
Severity
  • 6.5 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N CVSS Calculator
Summary
Pydantic AI AG-UI Adapter: A dangling client-submitted tool call can execute when a trailing message is dropped during `sanitize_messages`
Details

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.toagui()/AGUIAdapter, and Vercel AI via VercelAIAdapter) use sanitizemessages 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 managesystemprompt='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 (beforemodelrequest / aftermodelrequest), since a forged call skips the model turn and bypasses that guardrail; approval-gated tools (requiresapproval=True) are not auto-executed by this path. This issue has been fixed in versions 1.107.1 and 2.5.0.

Database specific
{
    "cna_assigner": "GitHub_M",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/65xxx/CVE-2026-65975.json",
    "cwe_ids": [
        "CWE-863"
    ]
}
References

Affected packages

Git / github.com/pydantic/pydantic-ai

Affected ranges

Type
GIT
Repo
https://github.com/pydantic/pydantic-ai
Events
Database specific
{
    "extracted_events": [
        {
            "introduced": "1.88.0"
        },
        {
            "fixed": "1.107.1"
        },
        {
            "introduced": "2.0.0b1"
        },
        {
            "fixed": "2.5.0"
        }
    ],
    "source": "AFFECTED_FIELD"
}

Affected versions

v1.*
v1.100.0
v1.101.0
v1.102.0
v1.103.0
v1.104.0
v1.105.0
v1.106.0
v1.107.0
v1.88.0
v1.89.0
v1.89.1
v1.90.0
v1.91.0
v1.92.0
v1.93.0
v1.94.0
v1.95.0
v1.95.1
v1.96.0
v1.96.1
v1.97.0
v1.98.0
v1.99.0
v2.*
v2.0.0
v2.1.0
v2.2.0
v2.3.0
v2.4.0

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-65975.json"