AI Stack Alert High CVE-2026-133161 For AppSec, AI Eng, SOC / IR AI-assisted
CVE-2026-133161: Pydantic AI Harness ToolOutputLimits strip_ansi quadratic ReDoS stalls event loop
With strip_ansi=True, Pydantic AI Harness's ToolOutputLimits capability removes ANSI escape sequences from tool output using a pattern whose time is quadratic in line length. A tool result of a few hundred kilobytes with many unterminated escape sequences can block the event loop for tens of seconds to minutes. The advisory gives a CVSS base score of 7.5.
Why it matters
Applications that run tools whose output an attacker can influence, such as shell commands, file reads, fetched pages, or MCP servers, can have every request and agent run in the process delayed. The stripping runs before the capability's own size limits apply, so those limits do not bound the cost.
Do this
- Upgrade pydantic-ai-harness to 0.70.0 or later.
- Until patched, keep strip_ansi at its default value of False on ToolOutputLimits.
- On Pydantic AI v1, where the harness cannot exceed 0.4.0, migrate to Pydantic AI v2 and pydantic-ai-harness 0.70.0, or keep strip_ansi disabled.
- Identify services that set strip_ansi=True on ToolOutputLimits or OverflowingToolOutput and prioritize them for upgrade.
Exploit Clock
No signals yet
- No exploitation signals yet
Signals
- NoCISA KEV
- 7.5CVSS
- NoPublic PoC
- 37/100Priority
- 85%Confidence
Evidence
“With `strip_ansi=True`, Pydantic AI Harness's `ToolOutputLimits` capability removes ANSI escape sequences from tool output with a pattern that takes time quadratic in the length of a line.”
“Upgrade `pydantic-ai-harness` to 0.70.0 or later. Until then, leave `strip_ansi` at its default, `False`.”
Sources
Affected / related
pydantic-ai-harness, Pydantic AI Harness ToolOutputLimits
Published 2026-11-19 15:17 UTC · updated 2026-11-19 16:35 UTC · AI-assisted summary, checked against quoted sources · How we score