{"id":"CVE-2026-107295","published":"2026-10-08T17:02:36Z","modified":"2026-10-08T17:53:29Z","title":"`pydantic-ai-slim` web UI `/api/chat` accepts browser-simple cross-origin requests that can trigger agent tool execution","vendor":"pydantic","product":"pydantic-ai","tier":"tail","description":{"text":"Pydantic AI is a Python agent framework for building applications and workflows with Generative AI. From 1.34.0 until 1.107.4 and 2.28.0, the Agent.to_web() and clai web development chat endpoint has missing request content-type validation. A website visited by a developer can submit a browser-compatible request to a loopback-hosted chat server, causing the served agent to run and execute tools with the privileges and credentials of the local process; client-relayed approval decisions also leave requires_approval=True tools exposed. Binding to localhost does not prevent a browser page from reaching the loopback address. This issue is fixed in versions 1.107.4 and 2.28.0.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.6,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00216,"percentile":0.06972,"provenance":"source"},"cwes":[{"id":"CWE-352","name":"Cross-Site Request Forgery"}],"references":[{"url":"https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-h4xc-3qfq-jf93","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/pydantic/pydantic-ai/pull/7382","tags":["x_refsource_MISC"]},{"url":"https://github.com/pydantic/pydantic-ai/pull/7383","tags":["x_refsource_MISC"]},{"url":"https://github.com/pydantic/pydantic-ai/commit/d2690201a1834005d382dbf5c47e0ed94ef8bf46","tags":["x_refsource_MISC"]},{"url":"https://github.com/pydantic/pydantic-ai/commit/dd2abbdfa029c9ad138e7cc0edd2eaeaf9ed69c0","tags":["x_refsource_MISC"]},{"url":"https://github.com/pydantic/pydantic-ai/releases/tag/v1.107.4","tags":["x_refsource_MISC"]},{"url":"https://github.com/pydantic/pydantic-ai/releases/tag/v2.28.0","tags":["x_refsource_MISC"]}],"priority":{"score":6.7,"factors":[{"name":"EPSS percentile","points":1.39},{"name":"CVSS severity","points":5.32}]},"vendorSlug":"pydantic","affectedVersions":[{"vendor":"pydantic","product":"pydantic-ai","versions":[">= 1.34.0, < 1.107.4",">= 2.0.0b1, < 2.28.0"]},{"vendor":"pydantic","product":"pydantic-ai-slim","versions":[">= 1.34.0, < 1.107.4",">= 2.0.0b1, < 2.28.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-10-08T17:53:16.989703Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"pydantic-ai","vulnerableRanges":[">=1.34.0, <1.107.4",">=2.0.0b1, <2.28.0"],"patched":["1.107.4","2.28.0"],"from":["GHSA-h4xc-3qfq-jf93","PYSEC-2026-4278"],"provenance":"source"},{"ecosystem":"PyPI","package":"pydantic-ai-slim","vulnerableRanges":[">=1.34.0, <1.107.4",">=2.0.0b1, <2.28.0"],"patched":["1.107.4","2.28.0"],"from":["GHSA-h4xc-3qfq-jf93","PYSEC-2026-4287"],"provenance":"source"}],"summary":{"text":"The pydantic-ai framework's Agent.to_web() and clai web development chat endpoint (/api/chat), in pydantic-ai-slim versions from 1.34.0 up to 1.107.4 and 2.28.0, lacks request content-type validation. An attacker can exploit this by luring a developer to a malicious website that submits a browser-compatible cross-origin request to the loopback-hosted chat server, which runs the agent and its tools with the local process's privileges and credentials, requiring only that the developer visit the page while the server is running.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:15:44Z"},"euvd":{"id":"EUVD-2026-95106","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-pydantic-ai-cve-2026-107286","children":[{"from":"CVE-2026-107295","to":"CVE-2026-107292","relation":"successor","confidence":"high","kind":"lineage","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:pydantic-ai","fromFixed":"2.28.0","toFixed":"2.30.0","daysApart":0},{"kind":"version-step","provenance":"source","package":"PyPI:pydantic-ai-slim","fromFixed":"2.28.0","toFixed":"2.30.0","daysApart":0},{"kind":"same-code","provenance":"machine","files":["pydantic_ai_slim/pydantic_ai/ui/_web/api.py"],"commits":["https://github.com/pydantic/pydantic-ai/commit/394cc1d31656620704a703a2daed752afa5135fe","https://github.com/pydantic/pydantic-ai/commit/871c7aeec5dfed2138655ccbccbf15c6d763bae7","https://github.com/pydantic/pydantic-ai/commit/d2690201a1834005d382dbf5c47e0ed94ef8bf46","https://github.com/pydantic/pydantic-ai/commit/dd2abbdfa029c9ad138e7cc0edd2eaeaf9ed69c0"],"basis":"shared function","functions":["create_api_app"]}]}],"packageHistory":[{"cve":"CVE-2026-54249","published":"2026-07-29","fixed":"2.0.0b6","kev":false},{"cve":"CVE-2026-107294","published":"2026-10-08","fixed":"2.24.0","kev":false,"link":{"from":"CVE-2026-107294","to":"CVE-2026-107295","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:pydantic-ai","fromFixed":"1.107.2","toFixed":"1.107.4","daysApart":0},{"kind":"version-step","provenance":"source","package":"PyPI:pydantic-ai-slim","fromFixed":"1.107.2","toFixed":"1.107.4","daysApart":0}]}},{"cve":"CVE-2026-107293","published":"2026-10-08","fixed":"2.27.1","kev":false,"link":{"from":"CVE-2026-107293","to":"CVE-2026-107295","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:pydantic-ai","fromFixed":"2.27.1","toFixed":"2.28.0","daysApart":0},{"kind":"version-step","provenance":"source","package":"PyPI:pydantic-ai-slim","fromFixed":"2.27.1","toFixed":"2.28.0","daysApart":0}]}},{"cve":"CVE-2026-107295","published":"2026-10-08","fixed":"2.28.0","kev":false},{"cve":"CVE-2026-107292","published":"2026-10-08","fixed":"2.30.0","kev":false},{"cve":"CVE-2026-107289","published":"2026-10-08","fixed":"2.44.0","kev":false},{"cve":"CVE-2026-107290","published":"2026-10-08","fixed":"2.44.0","kev":false}],"package":"PyPI:pydantic-ai"}}