Pydantic AI Harness: the browser egress policy misses four paths
Pydantic AI Harness enforced its browser egress policy on HTTP and page WebSockets only, leaving four other network paths open.
· Pydantic · Research by Pydantic AI maintainers
CVE-2026-136641 let a page an agent opens reach blocked destinations, because PlaywrightBrowser applied its egress policy to HTTP and page WebSockets but not to WebRTC, WebTransport, WebSocketStream or FedCM. Fixed in 0.74.0.
01What happened
Pydantic published GHSA-mj96-6529-3cpf and CVE-2026-136641 on November 25, 2026, rating the flaw moderate at CVSS 6.8. The advisory covers pydantic-ai-harness 0.24.0 through 0.73.0 and names 0.74.0 as the fix. The attacker it assumes controls script on a page the agent opens and has no other access to the application.
02How it works
PlaywrightBrowser's egress policy filtered HTTP requests and page WebSockets, but not WebRTC, WebTransport, WebSocketStream or the browser's own FedCM requests. A page the agent visits can therefore use a STUN probe to learn whether a blocked target responds, open a WebSocketStream that returns data from private addresses, or send a FedCM accounts request, which carries the browser profile's cookies, to a host outside the allowlist. Pydantic classifies the flaw as CWE-918, server-side request forgery.
03Who is affected
Releases from pydantic-ai-harness 0.24.0 up to and including 0.73.0 are affected, when PlaywrightBrowser opens untrusted URLs under an enforced egress policy. The advisory states that 0.74.0 still leaves some paths uncovered, including WebTransport from workers, WebSocketStream from workers when cdp_url is used, and certain sandboxed iframes and pre-attached documents.
04What to do
Upgrade to pydantic-ai-harness 0.74.0 or later, which removes the affected browser APIs from pages under the default enforced egress policy. Until that lands, Pydantic advises running the browser behind a network egress filter that also covers UDP, or not opening untrusted URLs with PlaywrightBrowser.
Sources 2 links, all fetched
- 1github.comPydantic Advisory
- 2github.comGitHub Advisory