GHSA-M5VJ-8MCW-82QX
Local web fetching can exhaust memory and block the event loop when it formats nested JSON
Texto original en inglés · Ver en español
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-M5VJ-8MCW-82QX divulgada · CVSS 7.5 (GitHub) | |
| Remediación | Parche 2.66.0 | pydantic-ai · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
Pydantic AI's local web-fetch tool re-indents a JSON response before it applies its returned-content limit, and does so on the event loop. Indented output grows with nesting depth, so a deeply nested document within the download size limit can expand to hundreds of times its size, using large amounts of memory and delaying other work in the same process.
Details
This affects applications that use `web_fetch_tool`, or the `WebFetch` capability's local fallback, on URLs an attacker can choose or influence. Provider-native web fetching is not affected.
The download size limit bounds the response, and `max_content_length` bounds what the model receives, but neither bounds the formatting step in between. A single fetch can stall other agent runs and requests served by the same process, and can exhaust the memory available to it.
The assumed attacker can get the agent to fetch a URL they control, for example by prompting an agent that has the tool when unauthenticated users can prompt it.
Mitigation
Upgrade to a patched version. Until then, restrict local web fetching to trusted hosts with `allowed_domains`, or use provider-native web fetching.
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 |
2.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-m5vj-8mcw-82qxLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
