CVE-2026-107292: Pydantic ai The Local Chat Endpoint Does Vulnerability
MODERATECVE-2026-107292 is a MODERATE (CVSS 6.4) the local chat endpoint does vulnerability (CWE-350: Reliance on Reverse DNS Resolution for a Security-Critical Action) affecting Pydantic ai libraries in the PyPI ecosystem. The issue involves the local chat endpoint does not validate the `host` header. Remediation is available by upgrading affected packages to version 1.107.5, 2.30.0.
CVE-2026-107292 at a Glance
Security Impact
CVSS: 6.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:L).
How to Fix CVE-2026-107292
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.5
pip install pydantic-ai>=2.30.0
pip install pydantic-ai-slim>=1.107.5
pip install pydantic-ai-slim>=2.30.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-107292, 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.5), 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-350: Reliance on Reverse DNS Resolution for a Security-Critical Action, where the product performs reverse dns resolution on an ip address to obtain the hostname and make a security decision, but it does not properly ensure that the ip address is truly associated with the hostname. 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-107292 Affected Pydantic ai Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pydantic-ai
|
PyPI |
≥ 1.34.0
< 1.107.5
|
1.107.5
|
|
pydantic-ai
|
PyPI |
≥ 2.0.0b1
< 2.30.0
|
2.30.0
|
|
pydantic-ai-slim
|
PyPI |
≥ 1.34.0
< 1.107.5
|
1.107.5
|
|
pydantic-ai-slim
|
PyPI |
≥ 2.0.0b1
< 2.30.0
|
2.30.0
|
References
Frequently Asked Questions
What is CVE-2026-107292?
Which Pydantic ai versions are affected?
What version fixes CVE-2026-107292?
Is pydantic-ai affected?
Is pydantic-ai-slim affected?
What is the CVSS score of CVE-2026-107292?
What CWE is associated with CVE-2026-107292?
How can I check PyPI dependencies for CVE-2026-107292?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-q2xc-rrxj-58x9",
"modified" : "2026-10-08T17:16:39Z",
"published" : "2026-10-08T17:16:39Z",
"aliases" : [ "CVE-2026-107292" ],
"summary" : "Pydantic AI Web chat UI (`Agent.to_web()`, `clai web`): the local chat endpoint does not validate the `Host` header",
"details" : "### Summary\n\nThe Pydantic AI development web chat UI (`Agent.to_web()`, `clai web`) does not validate the `Host` header of incoming requests. A website a developer visits can use DNS rebinding to make requests to a chat UI running on that developer's machine appear same-origin to the browser, causing the served agent to run and to execute its tools with the privileges and credentials of the local process.\n\n### Details\n\nOnce a name the attacker controls resolves to the loopback address, the browser treats the request as same-origin, so neither an `Origin` check nor a CSRF token constrains it — a same-origin page can read the served UI and any token in it.\n\nBinding the web UI to localhost — the default — does not prevent this.\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.\n\nCurrent browser protections reduce but do not remove this exposure: Chromium's Local Network Access gates loopback subresource requests, but does not cover top-level navigations, and Safari does not implement it.\n\n### Mitigation\n\nUpgrade to `pydantic-ai`/`pydantic-ai-slim` >= 2.30.0, or >= 1.107.5 on the v1 maintenance line.\n\nThe fix validates the `Host` header and rejects anything other than localhost, a loopback/LAN IP address, or an explicitly allowed host, responding `421 Misdirected Request` otherwise. If you serve the web chat UI under a real hostname — behind a reverse proxy, tunnel, or similar — name it explicitly:\n\n```python\napp = agent.to_web(allowed_hosts=['ui.example.com'])\n```",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/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.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "pydantic-ai"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0b1"
}, {
"fixed" : "2.30.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "pydantic-ai-slim"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.34.0"
}, {
"fixed" : "1.107.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "pydantic-ai-slim"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0b1"
}, {
"fixed" : "2.30.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-q2xc-rrxj-58x9"
}, {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/pull/7437"
}, {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/pull/7438"
}, {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/commit/394cc1d31656620704a703a2daed752afa5135fe"
}, {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/commit/871c7aeec5dfed2138655ccbccbf15c6d763bae7"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pydantic/pydantic-ai"
}, {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/releases/tag/v1.107.5"
}, {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/releases/tag/v2.30.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-346", "CWE-350" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-10-08T17:16:39Z",
"nvd_published_at" : null
}
}