Skip to main content

Pydantic AI EUVDEUVD-2026-95106

| CVE-2026-107295 HIGH
Cross-Site Request Forgery (CSRF) (CWE-352)
2026-10-08 security-advisories@github.com GHSA-h4xc-3qfq-jf93
7.6
CVSS 3.1 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Lure developer to malicious web page
  2. Delivery
    Page sends forged POST to 127.0.0.1 chat endpoint
  3. Exploit
    Endpoint accepts CORS-safelisted content type
  4. Execution
    Served agent runs and executes tools
  5. Persist
    Client-relayed approval unlocks requires_approval tools
  6. Impact
    Tool 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 Agent.to_web() or the clai web development chat UI (the vulnerable surface; binding to localhost/127.0.0.1 is the default and does NOT mitigate, since a browser page can reach the loopback address), AND that the same developer, in the same browser, visits an attacker-controlled page while the server is running. The forged request succeeds because the pre-patch endpoint performed no Content-Type validation, so a browser can deliver a JSON body using a CORS-safelisted content type (text/plain, multipart/form-data, application/x-www-form-urlencoded, or none) with no preflight. Realized damage is bounded by the tools the served agent exposes - an agent with side-effecting or credentialed tools is high risk, a read-only agent is low risk - and requires_approval=True does not limit it because the server trusts client-relayed approval decisions. Limiting factors: the attack is blind (no response read cross-origin), needs the dev UI to be running, and needs the developer to browse a malicious site concurrently.

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 Agent.to_web() / clai web chat server AND visit an attacker-controlled page in the same browser. Confidentiality is rated Low because the cross-origin attacker cannot read the response (no CORS Access-Control headers are returned), so this is primarily a blind request-forgery that triggers server-side tool execution rather than a data-read primitive - Integrity is High because the agent runs tools, including those marked requires_approval=True, with the local process's privileges and credentials. No EPSS score, KEV listing, POC, or SSVC data was supplied in the input; the exploitation status is therefore 'no public exploit identified at time of analysis'. The absence of KEV/EPSS combined with the dev-only, user-interaction-gated nature argues against mass exploitation. Realized impact is highly variable and bounded by what tools the served agent exposes: a read-only agent is near-harmless, whereas one with file-write, shell, or network/exfiltration tools could suffer meaningful compromise. Net: a real priority for teams that actually run the web UI with side-effecting tools, but lower urgency for the broader population given the development-only surface and the required developer interaction.

Exploit ScenarioDerived

A developer runs their agent locally via agent.to_web() or clai web, binding the chat server to 127.0.0.1, and then browses the web in the same session. An attacker-controlled page silently issues a browser-compatible POST (using a CORS-safelisted content type such as text/plain, which still carries a JSON body) to the loopback chat endpoint, causing the served agent to run and execute its tools - and to honor any client-relayed approval for requires_approval=True tools - with the local process's credentials. No public exploit code is identified in the provided data, but the technique is a straightforward, well-understood CSRF against a loopback service.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

pydantic-ai-slim 1.34.0, < 1.107.4
pydantic-ai 2.0.0b1, < 2.28.0
pydantic-ai-slim 2.0.0b1, < 2.28.0
pydantic-ai 1.34.0, < 1.107.4

Affected Packages

pypi pydantic-ai fix: 1.107.4, 2.28.0
pypi pydantic-ai-slim fix: 1.107.4, 2.28.0
euvd pydantic_ai_2_0_0b1 fix: 2.28.0
euvd pydantic_ai_slim_2_0_0b1 fix: 2.28.0

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

Vendor (github) PRIMARY 7.6 HIGH
AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L
vuln.today AI 7.6 HIGH

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).

3.1 AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N
Red Hat 7.6 HIGH

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
High
Availability
Low

Lifecycle Timeline

2
Patch available
Oct 08, 2026 - 18:03 EUVD
CVE Published
Oct 08, 2026 - 17:17 cve.org
HIGH 7.6

DescriptionCVE.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
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 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.

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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.2%
Top 95% exploitable
Prevalence
Low
development-only web chat UI feature, minimal production deployment footprint
Threat Intel
1
1 sources
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Cross-Site Request Forgery exploits the automatic credential inclusion behavior of web browsers.

CVE-2026-25580 HIGH POC
8.6 Feb 06

Pydantic AI versions 0.0.26 through 1.55.x contain a server-side request forgery vulnerability in URL download functiona

CVE-2026-107286 HIGH
7.5 Oct 08

Concurrency slot exhaustion in Pydantic AI 2.10.0 through 2.52.x lets streamed model requests permanently occupy slots i

CVE-2026-48782 MEDIUM
6.8 Jun 16

Server-Side Request Forgery in Pydantic AI (versions 1.56.0-1.101.0, 2.0.0b1, 2.0.0b2) allows unauthenticated network at

CVE-2026-107289 MEDIUM
6.8 Oct 08

Server-side request forgery in Pydantic AI's URL-fetching guards lets an application that has explicitly opted a URL int

CVE-2026-54249 MEDIUM POC
6.8 Jul 29

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

CVE-2026-107294 MEDIUM
6.5 Oct 08

Pydantic AI, a Python framework for building Generative AI agents, buffers complete HTTP response bodies before applying

CVE-2026-107290 MEDIUM
6.5 Oct 08

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

CVE-2026-107287 MEDIUM
6.5 Oct 08

Denial of service in Pydantic AI's local web_fetch_tool and WebFetch local fallback allows an attacker-controlled HTML p

CVE-2026-65975 MEDIUM
6.5 Jul 29

Tool call injection in Pydantic AI's UI adapters (AG-UI via Agent.to_ag_ui()/AGUIAdapter, and Vercel AI via VercelAIAdap

CVE-2026-107292 MEDIUM
6.4 Oct 08

DNS rebinding against the Pydantic AI development web chat server (Agent.to_web() and `clai web`) lets a hostile website

CVE-2026-133505 MEDIUM
5.9 Nov 20

Deserialization type confusion in Pydantic AI (pydantic-ai and pydantic-ai-slim) lets third-party-controlled tool result

CVE-2026-25640 MEDIUM
5.4 Feb 06

Pydantic AI versions 1.34.0 through 1.50.x contain a path traversal vulnerability in the web UI that allows unauthentica

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy