v1.107.5
pydantic/pydantic-aiv1.107.5Aug 14, 2026by dsfaccini
AI Summary
A security patch addressing a Host header validation vulnerability in the local dev web chat UI to prevent DNS rebinding attacks.
Key Highlights
- Fix for Host header validation vulnerability (GHSA-q2xc-rrxj-58x9)
- Default validation against localhost/loopback/LAN addresses
- New `allowed_hosts` setting for deployments using real hostnames
Full Release Notes
<!-- Release notes generated using configuration in .github/release.yml at v1 --> ## What's Changed ### 🛡️ Security * [GHSA-q2xc-rrxj-58x9](https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-q2xc-rrxj-58x9): the local dev web chat UI (`Agent.to_web()`, `clai web`) didn't validate the `Host` header, so DNS rebinding from a website you visit could reach it and run the served agent with your local process's tools and credentials. Fixed in `pydantic-ai`/`pydantic-ai-slim` 1.107.5 by validating `Host` against localhost/loopback/LAN addresses by default; deployments reached under a real hostname must opt in with the new `allowed_hosts` setting. Backport of `allowed_hosts` by @DouweM in https://github.com/pydantic/pydantic-ai/pull/7438 **Full Changelog**: https://github.com/pydantic/pydantic-ai/compare/v1.107.4...v1.107.5