CVE-2026-133161: Pydantic AI Harness ToolOutputLimits ANSI stripping slowed by quadratic regex
- Source
- NVD(opens in a new tab)
- Identifier
- CVE-2026-133161
- Published
- Record updated
- Known exploitation
- Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
Summary
Pydantic AI Harness's ToolOutputLimits capability, when strip_ansi=True is set (named OverflowingToolOutput before 0.13.0), strips ANSI escape sequences with a pattern whose run time grows quadratically with line length. A few-hundred-kilobyte tool result with many unterminated escape sequences can block the event loop for tens of seconds to minutes, delaying other requests and agent runs in the process. The attacker only needs to place text in content a tool returns, such as shell output, file reads, fetched pages or MCP server responses.
Mitigation
Upgrade 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 leave strip_ansi off.
Topics
Related items
- LowToken fraud is here and it’s BAD (YouTube)Similar attack · Simon Willison's Weblog
- HighCVE-2026-130686: vLLM resource exhaustion through many remote image URLs in one requestSimilar attack · NVD/CVE Database
- HighCVE-2026-130685: vLLM denial of service through out-of-range prompt token ids in /v1/completionsSimilar attack · NVD/CVE Database
- LowRented Oscillations: Multi-Tenant Data Center Workload Synchronization Attacks and MitigationSimilar attack · Arxiv (cs.CR + cs.CL + cs.LG)
- MediumCVE-2026-126399: vLLM resource exhaustion via video frame limit bypass in chat completionsSimilar attack · NVD/CVE Database