llamaCVEVulnerability Intelligence
/
Advisory · GitHub · PyPI · pydantic-ai-slim

GHSA-5PFM-2G3G-GH85

UI adapters: a client-submitted tool call can execute because the compaction-part drop runs after the dangling-call strip

Texto original en inglés · Ver en español

Parche disponible
Descargar PNG JSON
CVSS 3.1
5.4
Media
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche1 versiónPrimer parche el mismo día de la divulgación
Exposición32 dDesde la divulgación, 20 oct 2026, 12:31 a. m.
Detección30 dDesde la divulgación hasta su ingreso al índice
Decisión estimadaSeguir
Remediar en la ventana regular de mantenimiento
Estimación de Llama con el árbol SSVC de CISA a partir de vector CVSS 3.1 y la evidencia de explotación (sin evaluación oficial): sin explotación conocida, no automatizable e impacto técnico parcial. Hay versiones corregidas disponibles.
Esto lo arregla la rutina de siempre.Mi diagnóstico: un ticket y una sonrisa.
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Parche 2.58.0
Monitoreo
Detectada +1
20 oct 26
21 oct 26
20 nov 26
21 nov 26
20 oct 26
28 oct 26
5 nov 26
13 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-5PFM-2G3G-GH85 divulgada · CVSS 5.4 (GitHub)
Remediación Parche 2.58.0 pydantic-ai-slim · 0 d desde divulgación
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Summary

Pydantic AI's UI adapters, Vercel AI (`VercelAIAdapter`) and AG-UI (`AGUIAdapter` / `Agent.to_ag_ui()`), remove unresolved tool calls from the end of client-submitted history, so that a run without a new prompt does not execute a tool call the model never made. This is the protection fixed in GHSA-jpr8-2v3g-wgf9 https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-jpr8-2v3g-wgf9.

When the application passes its own server-side `message_history`, the adapters also drop client-submitted compaction parts. That drop ran after the unresolved-tool-call check. A client could arrange its history so that dropping a compaction-only message left an unchecked tool call at the end, and the agent then ran that tool with arguments the client chose, without a model request.

Details

The impact is bounded in the same way as GHSA-jpr8-2v3g-wgf9:

  • Tool arguments are still validated against the tool's schema.
  • Tools that require approval (`requires_approval=True` or `ApprovalRequiredToolset`) are not executed by this path.
  • Only tools available to the agent can be reached, and a client can often obtain the same call by prompting the model.

The difference from a model-produced call is that this call skips the model request. The model cannot decline it, and guardrails in `before_model_request` or `after_model_request` do not see it. Guardrails in `before_tool_execute` and authorization inside tool functions are unaffected.

You are affected if all of the following apply:

  • You serve an agent through the Vercel AI or AG-UI adapter.
  • You pass a non-empty server-side `message_history` to the adapter's run method.
  • `manage_system_prompt` is `'server'` (the default).
  • You rely on the model or a model-request hook, rather than on the tool function or `before_tool_execute`, to constrain how a tool that does not require approval is called.
Mitigation

Upgrade to a patched version. The adapters now drop client-submitted compaction parts before checking the end of the history.

Until you can upgrade:

  • Enforce authorization inside each tool function, against the authenticated user carried in your dependencies.
  • Place tool-execution guardrails in `before_tool_execute`, which runs however a tool call entered the history.
  • Require approval for tools whose effects matter.
Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:L
AltoBajoNinguno
IntegridadI:L
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
8.3/ 10Alto
Vector 8.3 (muy fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida Última
pydantic-ai-slim · pydantic-ai≥ 2.27.0 ≤ 2.57.0
2.27.0
2.57.0
2.68.0
2.71.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
pypipydantic-ai-slim
Corregida 2.58.0 0 d 2.71.0 no afectada
pypipydantic-ai
Corregida 2.58.0 0 d 2.68.0 no afectada
Versiones corregidas2.58.0
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/pydantic/pydantic-ai/security/advisories/GHSA-5pfm-2g3g-gh85

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.