GHSA-7494-925C-RRXV
Tool schemas with repeated definition references expand exponentially for models that need inlined schemas
Texto original en inglés · Ver en español
CVSS:3.1/AV:N/AC:L/PR:L/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-7494-925C-RRXV divulgada · CVSS 6.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
For models whose profile requires tool schemas without `$defs` and `$ref`, Pydantic AI inlines each referenced definition at every place it is referenced. A tool schema of a few kilobytes whose definitions reference one another repeatedly expands exponentially, using CPU and memory on the event loop each time a model request is prepared. Through the AG-UI adapter, a client submits the schemas of its own frontend tools, so a client can supply such a schema.
Details
This affects applications that serve an agent through the AG-UI adapter (`AGUIAdapter`, `handle_ag_ui_request`, `AGUIApp`) with a model whose schema definitions are inlined, including Amazon Nova, Meta Llama and Qwen models and, in recent releases, Mistral, Z.AI GLM and some OpenRouter and Azure-hosted models. Tool schemas from MCP servers reach the same code, but the application chooses those servers.
Expanding one crafted schema can take minutes of CPU time and gigabytes of memory, blocking other work in the process, and the expansion repeats for every model request in the run.
The assumed attacker is an authenticated client of the AG-UI endpoint; the UI documentation requires running the adapter behind application authentication.
Mitigation
Upgrade to a patched version. Until then, drop or limit client-submitted tools before passing the run input to the adapter, for example by rejecting tool schemas that contain `$defs`, or use a model that does not inline schema definitions.
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-7494-925c-rrxvLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
