CVE-2026-107295: Pydantic ai A Website Visited By The Vulnerability
HIGHCVE-2026-107295 is a HIGH (CVSS 7.6) a website visited by the vulnerability (CWE-346: Origin Validation Error) affecting Pydantic ai libraries in the PyPI ecosystem. The issue involves a website visited by the developer can trigger agent runs and server-side tool execution on the local chat endpoint. Remediation is available by upgrading affected packages to version 1.107.4, 2.28.0.
CVE-2026-107295 at a Glance
Security Impact
CVSS: 7.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L).
How to Fix CVE-2026-107295
To remediate this vulnerability, upgrade all affected Pydantic ai dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install pydantic-ai>=1.107.4
pip install pydantic-ai>=2.28.0
pip install pydantic-ai-slim>=1.107.4
pip install pydantic-ai-slim>=2.28.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pydantic-ai
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-107295, inspect your installed packages using pip:
pip show pydantic-ai
Analyze the terminal output to locate any version of Pydantic ai in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.107.4), your application is affected.
Note: The pip show pydantic-ai command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-346: Origin Validation Error, where the product does not properly verify that the source of data or communication is valid. In Pydantic ai, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-107295 Affected Pydantic ai Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pydantic-ai
|
PyPI |
≥ 1.34.0
< 1.107.4
|
1.107.4
|
|
pydantic-ai
|
PyPI |
≥ 2.0.0b1
< 2.28.0
|
2.28.0
|
|
pydantic-ai-slim
|
PyPI |
≥ 1.34.0
< 1.107.4
|
1.107.4
|
|
pydantic-ai-slim
|
PyPI |
≥ 2.0.0b1
< 2.28.0
|
2.28.0
|
References
Frequently Asked Questions
What is CVE-2026-107295?
Which Pydantic ai versions are affected?
What version fixes CVE-2026-107295?
Is pydantic-ai affected?
Is pydantic-ai-slim affected?
What is the CVSS score of CVE-2026-107295?
What CWE is associated with CVE-2026-107295?
How can I check PyPI dependencies for CVE-2026-107295?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-h4xc-3qfq-jf93",
"modified" : "2026-10-08T17:16:36Z",
"published" : "2026-10-08T17:16:36Z",
"aliases" : [ "CVE-2026-107295" ],
"summary" : "Pydantic AI Web chat UI (`Agent.to_web()`, `clai web`): a website visited by the developer can trigger agent runs and server-side tool execution on the local chat endpoint",
"details" : "### Summary\n\nThe Pydantic AI development web chat UI (`Agent.to_web()`, `clai web`) did not check the content type of requests to its chat endpoint. This allowed a website visited by a developer to submit a request to a chat UI running on that developer's machine, causing the served agent to run and to execute its tools with the privileges and credentials of the local process.\n\nBinding the web UI to localhost — the default — does not prevent this, because a page open in the developer's browser can reach the loopback address.\n\n### Impact\n\nApplications and developers serving an agent through `Agent.to_web()` or `clai web`. The consequences depend on the tools the served agent exposes, and can include data disclosure as well as unwanted tool side effects. Tools marked `requires_approval=True` were not protected either, because the endpoint trusts approval decisions relayed by the client.\n\n### Mitigation\n\nUpgrade to a patched version. The chat endpoint now requires `Content-Type: application/json` and rejects other requests before the request body is parsed and before the agent runs. The bundled chat UI already sends this header; scripts and other non-browser clients that call the endpoint directly may need to be updated to send it.\n\nIf you cannot upgrade, don't run the web UI while browsing untrusted sites, stop it when you aren't using it, and don't serve an agent with side-effecting tools through it.\n\n### Credits\n- Thai Son Dinh from VinSOC Labs (R&D)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pydantic-ai"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.34.0"
}, {
"fixed" : "1.107.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "pydantic-ai"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0b1"
}, {
"fixed" : "2.28.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "pydantic-ai-slim"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.34.0"
}, {
"fixed" : "1.107.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "pydantic-ai-slim"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0b1"
}, {
"fixed" : "2.28.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-h4xc-3qfq-jf93"
}, {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/pull/7382"
}, {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/pull/7383"
}, {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/commit/d2690201a1834005d382dbf5c47e0ed94ef8bf46"
}, {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/commit/dd2abbdfa029c9ad138e7cc0edd2eaeaf9ed69c0"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pydantic/pydantic-ai"
}, {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/releases/tag/v1.107.4"
}, {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/releases/tag/v2.28.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-346", "CWE-352" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-10-08T17:16:36Z",
"nvd_published_at" : null
}
}