CVE-2026-136641 in AI Harness
Summary
by MITRE • 11/25/2026
Pydantic AI Harness's PlaywrightBrowser enforces its egress policy on HTTP requests and page WebSockets, but not on WebRTC or WebTransport connections, WebSockets opened with WebSocketStream, or the requests the browser itself sends for FedCM. A page the agent opens can make the browser send WebRTC (STUN and TURN), WebTransport and WebSocketStream traffic, and FedCM requests, to hosts and ports that the policy refuses, including under a policy that limits every request kind to an allowlist.
This affects applications that use PlaywrightBrowser to open pages an attacker can influence. The traffic is each protocol's connection setup, sent to a destination the page chooses. A page can learn whether a target answers a STUN request. No response body from an ordinary internal service was readable through WebRTC, WebTransport or FedCM. A WebSocketStream is an ordinary WebSocket that the WebSocket guard does not see, opened from a page, a frame or a worker, and the page reads what the server sends, including from a private address. Chromium's Local Network Access blocks WebTransport from public pages to private addresses, but does not block WebRTC.
A FedCM call (navigator.credentials.get with an identity provider) makes the browser fetch the provider's /.well-known/web-identity, config, accounts and client metadata URLs. The page chooses the config URL's path and the client ID, so it can send data to a host outside allowed_domains or listed in blocked_domains. The accounts request carries the provider's cookies from the browser profile. FedCM requires a provider origin that is HTTPS or loopback.
The assumed attacker is a third party with no access to the application who controls script on a page the agent opens.
Under an enforced egress policy, which is the default, pydantic-ai-harness 0.74.0 removes RTCPeerConnection, webkitRTCPeerConnection, WebTransport, WebSocketStream, IdentityCredential and IdentityProvider from every page and frame, refuses FedCM calls to navigator.credentials.get, and launches Chromium with FedCM and WebSocketStream turned off. These paths stay outside the policy: WebTransport from workers; WebSocketStream from workers in a browser reached over cdp_url; WebTransport in sandboxed iframes that Chromium runs in their own process (headless=False and cdp_url); and documents loaded before attachment under cdp_context='default'.
Upgrade pydantic-ai-harness to 0.74.0 or later. For the paths the upgrade leaves open, and until you upgrade, run the browser behind a network egress filter that also covers UDP, or do not open untrusted URLs with PlaywrightBrowser.
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
Analysis
by VulDB Data Team • 11/27/2026
The vulnerability in Pydantic AI Harness's PlaywrightBrowser implementation stems from an incomplete enforcement of egress security policies across specific web protocols and API interfaces. While the framework correctly restricts standard HTTP requests and traditional WebSockets, it fails to apply equivalent restrictions to emerging or less commonly monitored connection types such as WebRTC, WebTransport, WebSocketStream, and FedCM-related browser-initiated traffic. This architectural gap allows a malicious page opened by an agent to bypass network egress controls that are designed to limit outbound connections to a strict allowlist of domains and ports. The core technical flaw lies in the fact that these specific protocols operate outside the scope of the existing WebSocket guard and HTTP request filters, effectively creating blind spots where data exfiltration or unauthorized communication can occur without triggering policy violations.
From an operational perspective, this vulnerability enables several distinct attack vectors depending on the protocol exploited. WebRTC connections allow a page to initiate STUN and TURN requests, which can be used for network reconnaissance by determining whether specific target hosts respond to connection attempts. Although reading response bodies from internal services via these channels may be limited due to browser security models like Chromium's Local Network Access restrictions, the ability to probe private addresses remains a significant risk. Similarly, WebSocketStream connections are treated as ordinary WebSockets but escape detection because they do not pass through the standard WebSocket guard mechanism. This allows pages opened in frames or workers to establish direct communication channels with external servers, including those on private network ranges, effectively bypassing perimeter defenses that rely solely on inspecting conventional HTTP and WebSocket traffic patterns.
The FedCM vulnerability presents a more sophisticated data exfiltration risk by leveraging browser identity management features. When an agent opens a page controlled by an attacker, the page can invoke navigator.credentials.get to trigger Identity Credential requests. This process causes the browser itself to fetch metadata URLs such as /.well-known/web-identity and configuration endpoints from the specified identity provider. Crucially, these requests are initiated by the browser rather than through standard JavaScript network APIs, allowing them to circumvent application-level filters. The accounts request associated with this flow carries cookies from the user's browser profile, potentially exposing sensitive session data or authentication tokens to an external host that is not included in the allowed domains list. This mechanism effectively turns identity verification processes into a covert channel for leaking authenticated state information out of the restricted environment.
The assumed threat model involves a third-party attacker with no direct access to the underlying application infrastructure but who controls script execution on a page opened by the agent. Under this scenario, the attacker can exploit these protocol gaps to establish persistent or one-off connections to external command-and-control servers, exfiltrate sensitive data via cookie leakage in FedCM flows, or perform network mapping using WebRTC STUN responses. The impact is particularly severe because it undermines the fundamental security assumption that egress policies applied at the application level will effectively contain all outbound traffic from untrusted web content. By exploiting these specific protocol implementations and browser behaviors, an attacker can achieve objectives that would otherwise be blocked by comprehensive network segmentation or proxy-based filtering strategies.
Mitigation requires a multi-layered approach addressing both software updates and infrastructure controls. The primary remediation is to upgrade pydantic-ai-harness to version 0.74.0 or later, which explicitly removes dangerous APIs such as RTCPeerConnection, webkitRTCPeerConnection, WebTransport, WebSocketStream, IdentityCredential, and IdentityProvider from pages and frames. This update also disables FedCM calls and launches Chromium with specific features turned off to close the identified gaps. However, certain edge cases remain open even after upgrading, including WebTransport initiated by workers, WebSocketStream connections in browsers accessed via cdp_url, and WebTransport within sandboxed iframes running headless=False. For these residual risks, organizations must implement network-level egress filtering that covers UDP traffic to block STUN/TURN requests and restricts outbound connectivity at the firewall level rather than relying solely on application-layer controls. Additionally, until upgrades are deployed or for environments where upgrading is not immediately feasible, it is critical to avoid opening untrusted URLs with PlaywrightBrowser entirely, ensuring that only vetted and trusted content is processed within these constrained browser contexts.