CVE-2026-136638 in Ai Harness
Summary
by MITRE • 11/26/2026
Pydantic AI Harness's PlaywrightBrowser applies an egress policy to the requests a page makes. It treated any URL containing a backslash as having no host, and it allows script and asset requests with no host. A page script could therefore add a backslash to a URL's query to send requests to private addresses, to hosts outside allowed_domains, and to hosts in blocked_domains.
This affects applications that use PlaywrightBrowser to open pages or follow instructions an attacker can influence. It applies to fetch, XHR, sendBeacon, WebSocket and passive asset requests. Navigation and frames were not affected. A policy that limits every request kind to an allowlist did not prevent data from being sent to another host.
Responses from private services could be read only when the service permits cross-origin reads or accepts the WebSocket connection. Current Chromium versions separately block many requests from public pages to private addresses, but not requests between public hosts, and not when the browser runs behind a forward proxy.
The assumed attacker is a third party with no access to the application who controls script on a page the agent opens, or content that steers the agent's browser tools.
Upgrade pydantic-ai-harness to 0.74.0 or later. Until then, enforce egress outside the browser with a firewall or a filtering proxy, and do not rely on the browser's domain lists for untrusted pages.
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
Analysis
by VulDB Data Team • 11/26/2026
The Pydantic AI Harness PlaywrightBrowser component contains a critical security flaw in its implementation of an egress policy designed to restrict network requests made by web pages. This vulnerability stems from an incorrect parsing logic that treats any Uniform Resource Identifier containing a backslash character as having no host identifier. Consequently, the browser engine permits script and asset-based network requests that lack a defined host context to proceed without proper validation against configured domain allowlists or blocklists. This technical oversight creates a significant bypass mechanism for attackers who can inject malicious scripts into pages opened by the agent or influence content that steers the agents browser tools. The flaw effectively neutralizes security policies intended to limit outbound traffic, allowing data exfiltration and unauthorized communication with internal services.
The operational impact of this vulnerability is severe because it affects multiple types of network interactions including fetch API calls, XMLHttpRequests, sendBeacon transmissions, WebSocket connections, and passive asset requests such as images or stylesheets. While navigation events and frame loads were not affected by this specific parsing error, the ability to manipulate query parameters allows an attacker to append a backslash to a URL string in a way that tricks the browser into treating the destination as hostless. This enables the application to send sensitive data to private IP addresses, hosts outside of permitted domains, or explicitly blocked entities. The vulnerability is particularly dangerous because it applies even when strict egress policies are configured on allowlists, indicating a fundamental failure in how the security boundary is enforced at the network request level rather than just the domain resolution level.
From an industry standards perspective, this issue aligns with CWE-20 Improper Input Validation and CWE-918 Server Side Request Forgery where the application fails to properly validate inputs before using them to construct network requests. The attack vector is consistent with MITRE ATT&CK technique T1567 Exfiltration Over Web Service as it allows an attacker to leverage legitimate browser capabilities to send data out of a restricted environment. Although modern Chromium versions have implemented additional protections that block many direct requests from public pages to private addresses, these safeguards do not apply when the browser operates behind a forward proxy or between different public hosts. This means that in enterprise environments where proxies are commonly used for traffic management and inspection, this vulnerability remains fully exploitable despite broader browser security improvements.
The threat model assumes an attacker who is a third party with no direct access to the underlying application infrastructure but possesses control over script execution on a page opened by the agent or can manipulate content that influences the agents behavior through its browser tools. This scenario is common in AI-driven applications where user-provided prompts or external data sources are processed automatically, potentially executing untrusted code within the context of the automated browsing session. The risk is compounded because responses from private services may be readable if those internal services permit cross-origin resource sharing or accept WebSocket connections without sufficient origin verification. This creates a pathway for sensitive information to leak out of the protected network perimeter through seemingly legitimate browser traffic that bypasses domain-based filtering rules.
To mitigate this vulnerability, organizations must upgrade pydantic-ai-harness to version 0.74.0 or later which addresses the flawed URL parsing logic and enforces stricter host validation. Until such an update can be deployed, it is imperative to enforce egress controls outside of the browser environment using network-level firewalls or filtering proxies that inspect traffic regardless of how URLs are parsed by the client-side engine. Security teams should not rely solely on the browsers internal domain lists for untrusted pages as these mechanisms proved insufficient against this specific parsing bypass. Implementing zero-trust principles at the network layer ensures that even if application-layer controls fail, unauthorized outbound connections to private or blocked addresses will be intercepted and dropped before they can result in data exfiltration or lateral movement within the infrastructure.