Skip to main content

Pydantic AI CVE-2026-107292

| EUVDEUVD-2026-95099 MEDIUM
Origin Validation Error (CWE-346)
2026-10-08 GitHub_M GHSA-q2xc-rrxj-58x9
6.4
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Lure developer to attacker-controlled page
  2. Delivery
    Rebind controlled hostname to 127.0.0.1
  3. Exploit
    Browser treats page as same-origin with local UI
  4. Execution
    Submit chat requests executing agent tools
  5. Impact
    Disclose 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 clai web on an affected version (pydantic-ai/pydantic-ai-slim 1.34.0-<1.107.5 or 2.0.0b1-<2.30.0), typically bound to localhost. The attacker must control a DNS name and rebind it to the loopback address, and the targeted developer must visit the attacker's page in the same browser (UI:R). The blast radius is defined precisely by which tools the served agent exposes - data disclosure plus any side effects those tools can perform with the local process's credentials. Limiting factors: the feature is developer/debug-oriented rather than a production service; required user interaction and attacker-controlled DNS with rebind timing raise complexity (AC:H); Chromium's Local Network Access gates loopback subresource requests (but not top-level navigations), and Safari does not implement it, so browser protections reduce but do not eliminate exposure; localhost binding, Origin checks, and CSRF tokens do NOT mitigate it.

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 clai web or an app using Agent.to_web() on localhost visits an attacker-controlled website in the same browser. The page uses DNS rebinding to point a name it controls at 127.0.0.1, so the browser treats it as same-origin with the local chat UI, defeating the localhost bind, Origin checks, and CSRF tokens. The hostile page then reads the served UI and submits chat requests that drive the agent's tools with the local process's privileges and credentials. No public exploit is identified at time of analysis, though the technique (DNS rebinding) is well understood and the high complexity reflects setup and timing rather than deep novelty.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.1% exploitation probability (EPSS)

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

Alert me

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

pydantic-ai 2.0.0b1, < 2.30.0
pydantic-ai-slim 1.34.0, < 2.0.0b1
pydantic-ai 1.34.0, < 2.0.0b1
pydantic-ai-slim 2.0.0b1, < 2.30.0

Affected Packages

pypi pydantic-ai fix: 1.107.5, 2.0.0b1, 2.30.0
pypi pydantic-ai-slim fix: 1.107.5, 2.0.0b1, 2.30.0
euvd pydantic_ai_2_0_0b1 fix: 2.30.0
euvd pydantic_ai_slim_2_0_0b1 fix: 2.30.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 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

Vendor (GitHub_M) PRIMARY 6.4 MEDIUM
AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:H/A:L
vuln.today AI 6.4 MEDIUM

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.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

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

Lifecycle Timeline

1
Patch available
Oct 08, 2026 - 18:03 EUVD

DescriptionCVE.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
† 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.

Threat Intelligence Overview

EPSS Score
0.1%
Top 98% exploitable
Prevalence
Medium
popular Python AI agent library, but vulnerable surface is a dev-only web chat feature
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium

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 MEDIUM
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.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· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
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-107295 HIGH
7.6 Oct 08

Cross-site request forgery in Pydantic AI's development web chat UI allows any website a developer happens to visit whil

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

CVE-2026-107288 LOW
3.7 Oct 08

A domain-denylist bypass in Pydantic AI's local web-fetch tooling (web_fetch_tool and the WebFetch local fallback) lets

Vendor StatusVendor

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