Skip to content
HighVulnerability

GHSA-h4xc-3qfq-jf93: Pydantic AI Web chat UI (`Agent.to_web()`, `clai web`): a website visited by the developer can trigger agent runs and server-side tool execution on the local chat endpoint

Published
Record updated
View JSON
Affected
  • pydantic-ai-slim >= 2.0.0b1, < 2.28.0, fixed in 2.28.0, released August 11, 2026, 57 days before disclosure
  • pydantic-ai-slim >= 1.34.0, < 1.107.4, fixed in 1.107.4, released August 11, 2026, 57 days before disclosure
  • pydantic-ai >= 2.0.0b1, < 2.28.0, fixed in 2.28.0, released August 11, 2026, 57 days before disclosure
  • and 1 more
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.2%

Summary

The Pydantic AI development web chat UI (`Agent.to_web()`, `clai web`) did not check the content type of requests to its chat endpoint. A website visited by a developer could submit a request to the chat UI on that developer's machine, causing the served agent to run and execute its tools with the privileges and credentials of the local process, including tools marked `requires_approval=True`, because the endpoint trusts approval decisions relayed by the client.

Mitigation

Upgrade to a patched version. The chat endpoint now requires `Content-Type: application/json` and rejects other requests before the request body is parsed and before the agent runs. Scripts and other non-browser clients calling the endpoint directly may need to send this header. If you cannot upgrade, don't run the web UI while browsing untrusted sites, stop it when not in use, and don't serve an agent with side-effecting tools through it.