Vulnerability · Published Oct 8, 2026 · Assigned by GitHub_M
CVE-2026-107295`pydantic-ai-slim` web UI `/api/chat` accepts browser-simple cross-origin requests that can trigger agent tool execution
High 7.6
In plain English
A high-severity cross-site request forgery in pydantic-ai from pydantic. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 5% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | pydantic-ai | 1.107.4 | GHSA-h4xc-3qfq-jf93 |
| PyPI | pydantic-ai | 2.28.0 | GHSA-h4xc-3qfq-jf93 |
| PyPI | pydantic-ai | 1.107.4, 2.28.0 | PYSEC-2026-4278 |
| PyPI | pydantic-ai-slim | 1.107.4 | GHSA-h4xc-3qfq-jf93 |
| PyPI | pydantic-ai-slim | 2.28.0 | GHSA-h4xc-3qfq-jf93 |
| PyPI | pydantic-ai-slim | 1.107.4, 2.28.0 | PYSEC-2026-4287 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| pydantic | pydantic-ai | >= 1.34.0, < 1.107.4>= 2.0.0b1, < 2.28.0 |
| pydantic | pydantic-ai-slim | >= 1.34.0, < 1.107.4>= 2.0.0b1, < 2.28.0 |
Weakness: CWE-352 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L
References
- https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-h4xc-3qfq-jf93 x_refsource_CONFIRM
- https://github.com/pydantic/pydantic-ai/pull/7382 x_refsource_MISC
- https://github.com/pydantic/pydantic-ai/pull/7383 x_refsource_MISC
- https://github.com/pydantic/pydantic-ai/commit/d2690201a1834005d382dbf5c47e0ed94ef8bf46 x_refsource_MISC
- https://github.com/pydantic/pydantic-ai/commit/dd2abbdfa029c9ad138e7cc0edd2eaeaf9ed69c0 x_refsource_MISC
- https://github.com/pydantic/pydantic-ai/releases/tag/v1.107.4 x_refsource_MISC
- https://github.com/pydantic/pydantic-ai/releases/tag/v2.28.0 x_refsource_MISC