Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessLure developer to attacker-controlled page
-
DeliveryRebind controlled hostname to 127.0.0.1
-
ExploitBrowser treats page as same-origin with local UI
-
ExecutionSubmit chat requests executing agent tools
-
ImpactDisclose data or trigger tool side effects
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Origin validation
|
| Exploitation Conditions | Requires a developer to be running the Pydantic AI development web chat UI via Agent.to_web() or |
| Impact | This is a genuine but conditional, medium-severity issue rather than a top-priority fire drill. The input CVSS of 6.4 (AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:L) is internally consistent with the description: network-reachable via the browser, but gated by high attack complexity (DNS rebinding requires attacker-controlled DNS, timing/rebind of a name to loopback, and a race against the browser) and by required user interaction (the developer must visit a hostile page in the same browser). No EPSS score, KEV listing, or public POC is present in the supplied data, so exploitation is 'no public exploit identified at time of analysis' - there is no evidence of active or widespread exploitation. The key tension is that the vulnerable surface, Agent.to_web()/clai web, is an explicitly developer-facing local chat server, not a production service, which narrows the realistic target population and tempers the AV:N 'network' framing (the bind is to localhost by default; reachability comes only through the DNS-rebinding same-origin trick, not a directly exposed port). Overall real impact is bounded by, and entirely dependent on, which tools the served agent exposes - a read-only agent leaks served UI/credentials (C:L), while an agent with powerful tools yields meaningful integrity impact (I:H). Treat as a 'patch promptly on dev machines' item, not an emergency; no key signals conflict, but note the absence of EPSS/KEV/POC data means prevalence of exploitation cannot be quantified from the input. |
| Exploit ScenarioDerived | A developer running |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 08, 2026
DNS rebinding against the Pydantic AI development web chat server (Agent.to_web() and clai web) lets a hostile website visited by a developer reach the loopback-hosted agent as a same-origin service, read the served UI, and submit chat requests that execute the agent's tools with the local process's privileges and credentials - resulting in data disclosure or unwanted side effects. The flaw affects pydantic-ai and pydantic-ai-slim versions 1.34.0 through 1.107.4 on the v1 line and 2.0.0b1 through 2.29.x on the v2 line, and is fixed in 1.107.5 and 2.30.0. Scoring is CVSS 3.1 6.4 (AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:L), reflecting an unauthenticated remote attack path that nevertheless requires the attacker to control a DNS name and persuade a developer to visit the attacker's page in the same browser; no public exploit code or CISA KEV listing was identified at time of analysis, and no EPSS score was supplied.
RemediationAI
Vendor-released patch: upgrade to pydantic-ai/pydantic-ai-slim 2.30.0 or later, or 1.107.5 or later on the v1 maintenance line, per GHSA-q2xc-rrxj-58x9. If the upgraded UI is served under a real hostname - behind a reverse proxy, tunnel, or similar - the Host check will reject it with 421 Misdirected Request unless the name is declared explicitly, either in code via agent.to_web(allowed_hosts=['ui.example.com']) (wildcards such as '*.example.com' match subdomains only, so list the apex separately; note that a wildcard on a domain where anyone can obtain a subdomain re-opens the issue) or from the CLI via clai web --allowed-host ui.example.com; clai web --host <name> adds that name automatically. Passing allowed_hosts=['*'] removes all protection and is only safe when something in front of the app already authenticates requests. Because every route, including /api/health, is subject to the check, health checks and container probes that send a DNS name in their Host header will start receiving 421 - often surfacing only as an opaque status code - so point probes at the bound IP address or localhost, or add their hostname to the allow list. No vendor-released patch exists for versions below 1.34.0 on the v1 line, but those releases predate the affected code path; as a compensating control for un-upgradable deployments, keep the web UI bound to loopback, do not run it as a privileged user, restrict which tools the served agent exposes, and place authentication in front of to_web() - noting that binding to localhost, Origin checks, and CSRF tokens do not by themselves block the rebinding path. Upstream fixes are available as PRs 7437 and 7438 and commits 394cc1d31656620704a703a2daed752afa5135fe and 871c7aeec5dfed2138655ccbccbf15c6d763bae7.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 4 packages in pypi, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-346 (Origin Validation Error): the ASGI application behind Agent.to_web() and the clai web CLI never validated the HTTP Host header on incoming requests. Binding the server to localhost was treated as a security boundary, but it is not one - a browser page can also address http://127.0.0.1:port. Because Host was unchecked, an attacker who controls a DNS name can point that name at 127.0.0.1 (DNS rebinding) and then have the victim's browser treat the attacker's site and the local agent UI as the same origin. Once same-origin, the existing controls become ineffective: Origin checks pass, CSRF tokens can be read from the served UI, and the JSON Content-Type restriction (which normally forces a cross-origin preflight the server refuses) no longer applies. Requests therefore reach the agent's chat endpoint and trigger tool execution under the privileges and credentials of the local Python process. Browser-level mitigations only partially help: Chromium's Local Network Access restricts loopback subresource requests but does not cover top-level navigations, and Safari does not implement it. The upstream fix adds Host header validation, accepting only IP addresses (127.0.0.1, [::1], LAN addresses), localhost and its subdomains (including punycode forms), or hostnames explicitly listed in the new allowed_hosts parameter; everything else receives 421 Misdirected Request. The patch spans PRs 7437 and 7438 and commits 394cc1d31656620704a703a2daed752afa5135fe and 871c7aeec5dfed2138655ccbccbf15c6d763bae7, and confirms this is a developer/debug surface rather than a production service.
Know when Pydantic Ai gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:L
AV:N and UI:R because the attack reaches the local server only through a browser the developer must drive to a hostile page; AC:H for attacker-controlled DNS and rebind timing; PR:N as no app auth is needed; I:H reflects agent tool side effects.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
Pydantic AI is a Python agent framework for building applications and workflows with Generative AI. From 1.34.0 until 2.30.0, the Agent.to_web() and clai web development chat server does not validate the Host header, allowing a website visited by a developer to use DNS rebinding to reach a loopback-hosted agent as a same-origin service. The hostile page can read the served UI and submit chat requests that execute agent tools with the local process's privileges and credentials, causing data disclosure or unwanted side effects. Binding to localhost, Origin checks, and CSRF tokens do not prevent the same-origin DNS rebinding path. This issue is fixed in versions 1.107.5 and 2.30.0.
Blast Radius
ecosystem impact- 1 pypi packages depend on pydantic-ai (1 direct, 0 indirect)
- 4 pypi packages depend on pydantic-ai-slim (3 direct, 1 indirect)
Ecosystem-wide dependent count for version 1.34.0 and other introduced versions.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.
More in Pydantic Ai
View allPydantic AI versions 0.0.26 through 1.55.x contain a server-side request forgery vulnerability in URL download functiona
Cross-site request forgery in Pydantic AI's development web chat UI allows any website a developer happens to visit whil
Concurrency slot exhaustion in Pydantic AI 2.10.0 through 2.52.x lets streamed model requests permanently occupy slots i
Server-Side Request Forgery in Pydantic AI (versions 1.56.0-1.101.0, 2.0.0b1, 2.0.0b2) allows unauthenticated network at
Server-side request forgery in Pydantic AI's URL-fetching guards lets an application that has explicitly opted a URL int
Server-Side Request Forgery in Pydantic AI's UI adapter layer (versions 1.65.0-1.105.0 and 2.0.0b1-2.0.0b5) allows unaut
Pydantic AI, a Python framework for building Generative AI agents, buffers complete HTTP response bodies before applying
Denial of service in Pydantic AI (pydantic-ai and pydantic-ai-slim) versions 1.77.0 through 1.107.5 and 2.0.0b1 through
Denial of service in Pydantic AI's local web_fetch_tool and WebFetch local fallback allows an attacker-controlled HTML p
Tool call injection in Pydantic AI's UI adapters (AG-UI via Agent.to_ag_ui()/AGUIAdapter, and Vercel AI via VercelAIAdap
Pydantic AI versions 1.34.0 through 1.50.x contain a path traversal vulnerability in the web UI that allows unauthentica
A domain-denylist bypass in Pydantic AI's local web-fetch tooling (web_fetch_tool and the WebFetch local fallback) lets
EUVD-2026-95099
GHSA-q2xc-rrxj-58x9
NVD
CVE.org
EPSS
VulDB
Exploit-DB