GHSA-5PPX-9JQ6-6PMW
Domain allowlists in web fetching and PlaywrightBrowser resolved refused hostnames before rejecting them
Texto original en inglés · Ver en español
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-5PPX-9JQ6-6PMW divulgada · CVSS 3.7 (GitHub) | |
| Remediación | Parche 2.66.0 | pydantic-ai · 0 d desde divulgación | |
| Remediación | Parche 0.66.0 | pydantic-ai-harness · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
The local web-fetch tool and the `PlaywrightBrowser` harness capability looked up a hostname in DNS before checking it against their domain lists. A host outside the allowlist was refused and never contacted over HTTP, but its name still went to the resolver, which forwards it to that domain's nameserver. Data encoded in the hostname, such as `<data>.attacker.example`, could therefore leave the application despite the allowlist.
Details
The assumed attacker is a third party with no access to the application, who controls content the agent processes, such as a fetched page, a document, or a tool result. If that content induces the model to request a URL whose hostname encodes data from the conversation, the lookup delivers that data to the nameserver of a domain the attacker controls. Each lookup carries at most one hostname's worth of data, and exploitation depends on the injected instructions steering the model.
The lookup also made some refusals depend on DNS: in the web-fetch tool, a host outside the allowlist that resolved to a private address was reported as a private-address error rather than a domain-list refusal, revealing how the name resolved.
Domain lists are now checked before the hostname is resolved, for the initial request and every redirect in the web-fetch tool, and for every request the built-in `PlaywrightBrowser` `EgressPolicy` evaluates.
Who is affected
You are affected if the model can process content that untrusted parties influence, and either:
- you configure `allowed_domains` on the local web-fetch tool, directly through `web_fetch_tool(allowed_domains=[...])` or through the `WebFetch` capability's local fallback (`pydantic-ai` / `pydantic-ai-slim`); or
- you use `PlaywrightBrowser` (`pydantic-ai-harness`) with an `EgressPolicy` whose `allowed_domains` bounds every request kind, so that you rely on no request leaving for a host outside the list.
With `PlaywrightBrowser`'s default `allowlist_reach`, passive subresources such as images are not bounded by the allowlist, so a page can already signal to any host, as its documentation states. Configurations that use only `blocked_domains` were not relying on this boundary, because a blocklist permits every host it does not list.
Mitigation
Upgrade to a patched version of each affected package. If you use `PlaywrightBrowser` with an `EgressPolicy` subclass that overrides `refuse`, the patched version still resolves every host, because an override may permit hosts the domain lists refuse. Also override `needs_resolution` to return `False` for the hosts your override refuses by name. Until then, restrict DNS resolution for the process to the domains in your allowlist, for example with a resolver or egress policy that refuses other names.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
pypipydantic-ai |
Corregida | 2.66.0 | 0 d | 2.68.0 no afectada |
pypipydantic-ai-slim |
Corregida | 2.66.0 | 0 d | 2.71.0 no afectada |
pypipydantic-ai-harness |
Corregida | 0.66.0 | 0 d | 0.71.0 no afectada |
0.66.02.66.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-5ppx-9jq6-6pmwLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
