Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessLure developer to malicious web page
-
DeliveryPage sends forged POST to 127.0.0.1 chat endpoint
-
ExploitEndpoint accepts CORS-safelisted content type
-
ExecutionServed agent runs and executes tools
-
PersistClient-relayed approval unlocks requires_approval tools
-
ImpactTool side effects / data access as local process
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V3 - Web Frontend Security Anti-CSRF tokens, SameSite cookies
MITRE ATT&CK
1 technique across 1 tactic: Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the developer be actively serving an agent via |
| Impact | This is a genuine but conditionally-exploitable CSRF flaw (CWE-352) in a developer-facing feature, not a drive-everywhere critical. The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L, 7.6 High) correctly captures the trade-offs: the endpoint is unauthenticated (PR:N) and reachable over the network/loopback (AV:N), but exploitation hinges on user interaction (UI:R) - a developer must be actively running the |
| Exploit ScenarioDerived | A developer runs their agent locally via |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 08, 2026
Cross-site request forgery in Pydantic AI's development web chat UI allows any website a developer happens to visit while Agent.to_web() or clai web is running to fire forged chat requests at the loopback-hosted server, causing the served agent to start a run and execute its tools with the privileges and credentials of the local process. The pre-patch /api/chat endpoint performed no Content-Type validation, so a malicious page can deliver a JSON body cross-origin using a CORS-safelisted content type (text/plain, multipart/form-data, application/x-www-form-urlencoded, or none at all) without triggering a preflight; binding the server to localhost - the default - provides no protection because a browser page can reach 127.0.0.1. Realized damage is bounded by the tools the agent exposes, and requires_approval=True does not help because the endpoint trusts approval decisions relayed by the client; exploitation is unauthenticated (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L, 7.6) but requires the developer to browse an attacker-controlled page while the dev UI is running, and there is no public exploit code identified at time of analysis. Vendor-released patches are available in 1.107.4 and 2.28.0.
RemediationAI
Vendor-released patch: upgrade pydantic-ai and pydantic-ai-slim to 1.107.4 (1.x line) or 2.28.0 (2.x line), which enforce Content-Type: application/json on /api/chat and reject everything else with HTTP 415 before the body is parsed, and keep the CORS preflight handler free of Access-Control-Allow-* headers; the fix is delivered via pull requests 7382/7383 and commits d2690201a1834005d382dbf5c47e0ed94ef8bf46 and dd2abbdfa029c9ad138e7cc0edd2eaeaf9ed69c0, with release notes at the v1.107.4 and v2.28.0 tags (full advisory: https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-h4xc-3qfq-jf93). Because the patch forces a non-safelisted content type, any script or non-browser client that calls the chat endpoint directly must be updated to send Content-Type: application/json; the bundled UI and the Vercel AI SDK DefaultChatTransport already do. If you cannot upgrade immediately: do not run to_web()/clai web while browsing untrusted sites and shut the server down when it is not in use (effective but disruptive to the development workflow); do not serve agents whose tools have side effects, credentials, or sensitive data access through the web UI (this removes the payload rather than the vulnerability, and still leaves data-disclosure paths through read-only tools); and front the endpoint with authentication and a CSRF token if it must be reachable at all. Do not 'fix' this by mounting a permissive Starlette CORSMiddleware or by switching to a denylist of safelisted content types - the commit explicitly warns that either change re-opens cross-origin access, including the no-Content-Type case, and treating the in-UI approval prompt as an authorization control is unsafe since the server trusts client-relayed decisions for requires_approval=True tools.
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 flaw is CWE-352 (Cross-Site Request Forgery) in a developer-facing HTTP surface rather than a memory-safety or injection bug. Pydantic AI's web chat extra ships a Starlette/uvicorn server (Agent.to_web(), clai web) whose /api/chat POST endpoint dispatched the agent before inspecting the request's Content-Type. That matters because of the Fetch/CORS rules: browsers allow cross-origin requests that carry only the three CORS-safelisted content types (text/plain, multipart/form-data, application/x-www-form-urlencoded) - or no Content-Type at all, which is what fetch() sends for a typeless Blob - without a preflight, and any of those media types can still carry a raw JSON body. Only a non-safelisted type such as application/json forces a preflight, and the pre-patch options_chat handler answered OPTIONS without any Access-Control-Allow-* headers, so simply requiring application/json would have been sufficient. Because the attacker never needs to read the response, the run itself is the damage, making the attack blind but still effective: arbitrary tool invocation, data disclosure through tool output side channels, or unwanted side effects on the developer's filesystem/accounts. The fix in the referenced commits adds a strict allowlist check (Content-Type must equal application/json, otherwise HTTP 415 before the body is parsed) and deliberately keeps the preflight handler header-free; the commit messages warn that adding permissive CORS middleware or downgrading to a denylist would silently reopen the endpoint. The accompanying packaging change raises the web extra's Starlette floor to >=1.3.1. The advisory credits Thai Son Dinh of VinSOC Labs. Note that PR:N reflects that no credentials are needed on the HTTP request itself - the ambient privilege is the local developer process the agent runs as - and UI:R reflects the required victim page visit.
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:L/PR:N/UI:R/S:U/C:L/I:H/A:L
Unauthenticated loopback endpoint (PR:N) reachable via browser (AV:N/AC:L) but requires the developer to visit a malicious page (UI:R); blind CSRF limits confidentiality (C:L) while tool execution drives integrity (I:H).
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
2DescriptionCVE.org
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.
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.
Articles & Coverage 1
Technical POC Analysis
Evidence note: the only supplied artefact is GitHub advisory GHSA-h4xc-3qfq-jf93.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
Pydantic AI's development web chat UI can be abused by any website a developer visits to make the local agent run tools with the developer's privileges and credentials, affecting teams using Agent.to_web() or clai web. No public exploit identified at time of analysis and no vendor-released patch identified at time of analysis, so the risk remains unmitigated by the vendor and requires immediate containment. Leadership should care because affected developer workstations may expose source code, credentials, or other sensitive data accessible to the agent's tools, even though exploitation requires user interaction.
No vendor-released patch identified at time of analysis. Interim mitigations: stop running Pydantic AI Agent.to_web() or clai web on developer workstations, or isolate them in a dedicated VM/container with least privilege and no access to production credentials or sensitive data; place a local reverse proxy or middleware in front of /api/chat to reject cross-origin requests and require Content-Type: application/json and a CSRF token; restrict or disable agent tools that can access credentials, code, or business data; do not rely on requires_approval=True; and monitor the Pydantic AI vendor advisory for CVE-2026-107295.
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
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
DNS rebinding against the Pydantic AI development web chat server (Agent.to_web() and `clai web`) lets a hostile website
Deserialization type confusion in Pydantic AI (pydantic-ai and pydantic-ai-slim) lets third-party-controlled tool result
Pydantic AI versions 1.34.0 through 1.50.x contain a path traversal vulnerability in the web UI that allows unauthentica
EUVD-2026-95106
GHSA-h4xc-3qfq-jf93
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB