Patch Ticker
EnglishEN
Elevated

pydantic-ai-harness ANSI stripping can block the event loop

CVE-2026-133161

An AI agent tool's output cleaner can freeze the whole server.

CVE
CVE-2026-133161 (opens in a new tab)
Score
CVSS 7.5
First seen

Mitigation

Update pydantic-ai-harness to 0.70.0 or later. Until then, leave strip_ansi at its default, False. On Pydantic AI v1, the harness cannot be upgraded past 0.4.0, so upgrade to Pydantic AI v2 and pydantic-ai-harness 0.70.0, or turn strip_ansi off.

Summary

With strip_ansi=True, pydantic-ai-harness's ToolOutputLimits can take quadratic time on crafted tool output, blocking the event loop for tens of seconds to minutes. Applications that enable this option and process tool output an attacker can influence are affected.

Affected when

  • strip_ansi=True set on ToolOutputLimits
  • Tool output an attacker can influence (shell commands, file reads, fetched pages, MCP servers)

2 other Incidents of this product in the last 30 days

Incidents by product: pydantic-ai-harness

Read the advisory · github.com (opens in a new tab)