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

- **Severity:** Medium: Real and reproducible, but needs unusual setup, user help or a narrow audience. Plan a fix.
- **Category:** Vulnerability
- **Published by:** Pydantic
- **Disclosed:** 2026-11-25
- **CVE:** CVE-2026-136641
- **CVSS:** 6.8
- **Affects:** Pydantic AI Harness, pydantic-ai-harness (PyPI)
- **Research by:** [Pydantic AI maintainers](https://github.com/pydantic/pydantic-ai)
- **Primary source:** https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-mj96-6529-3cpf
- **Page:** https://theinjection.dev/items/pydantic-ai-harness-browser-egress-gaps/

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.

## What 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.

## How 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.

## Who 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.

## What 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.

## Quick facts

- **CVE:** CVE-2026-136641
- **CVSS 3.1:** 6.8, Moderate (Pydantic)
- **Affected:** pydantic-ai-harness 0.24.0 through 0.73.0
- **Fixed in:** pydantic-ai-harness 0.74.0
- **Uncovered paths:** WebRTC, WebTransport, WebSocketStream, FedCM
- **Disclosed:** November 25, 2026, by Pydantic

## Sources

1. [Pydantic Advisory](https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-mj96-6529-3cpf)
2. [GitHub Advisory](https://github.com/advisories/GHSA-fqpx-wxvv-g359)
