GHSA-q2xc-rrxj-58x9: Pydantic AI Web chat UI (`Agent.to_web()`, `clai web`): the local chat endpoint does not validate the `Host` header
- Identifiers
- CVE-2026-107292GHSA-q2xc-rrxj-58x9
- Published
- Record updated
- Affected
- pydantic-ai-slim >= 2.0.0b1, < 2.30.0, fixed in 2.30.0, released August 13, 2026, 55 days before disclosure
- pydantic-ai-slim >= 1.34.0, < 1.107.5, fixed in 1.107.5, released August 13, 2026, 55 days before disclosure
- pydantic-ai >= 2.0.0b1, < 2.30.0, fixed in 2.30.0, released August 13, 2026, 55 days before disclosure
- and 1 more
- Known exploitation
- Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
- EPSS
- 0.1%
Summary
The Pydantic AI development web chat UI, served through `Agent.to_web()` and `clai web`, does not validate the `Host` header of incoming requests. Using DNS rebinding, a website a developer visits can make the browser treat requests to the local chat UI as same-origin, so the served agent runs and its tools execute with the privileges and credentials of the local process. Binding to localhost, the default, does not prevent this, and current browser protections only partly reduce the exposure.
Mitigation
Upgrade `pydantic-ai`/`pydantic-ai-slim` to >= 2.30.0, or to >= 1.107.5 on the v1 maintenance line. The 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`. If the web chat UI is served under a real hostname, such as behind a reverse proxy or tunnel, name it explicitly with `app = agent.to_web(allowed_hosts=['ui.example.com'])`.
Affected packages in the Exposure Registry
Matched by package name and ecosystem. Each entry shows whether the package delegates to a language model and how many tracked packages depend on it.
- pydantic-aiPyPILLM dependency since 2024-05-20 · 4 tracked dependents
- pydantic-ai-slimPyPILLM dependency since 2024-11-25 · 8 tracked dependents
Related items
- MediumFamiliar weaknesses, exploited faster: defending against agentic cyber attacksSimilar attack · UK NCSC
- MediumHackers Exploit N-able MailAssure Flaw While AI Agents Exploit MONAI Label Zero-DaySimilar attack · The Hacker News
- HighCVE-2026-133448: AutoGPT Claude Code CLI prompt preprocessing bypasses tool allow-listSimilar attack · NVD/CVE Database
- CriticalCVE-2026-118285: Azure Machine Learning server-side request forgery allows privilege elevationSimilar attack · NVD/CVE Database
- HighCVE-2026-130164: Hermes Agent code execution via screen environment file mergeSimilar attack · NVD/CVE Database