Skip to content
Threat Brief

← All advisories

CVE-2026-133161

High 7.5No known exploitationFix status unknown

Harness `ToolOutputLimits` ANSI stripping can take quadratic time, blocking the event loop

Record last updated

CVSS score

7.5

High on a 0 to 10 scale

EPSS, chance of exploitation in 30 days

0.4%

Higher than 36% of scored CVEs. A prediction, not evidence.

CISA remediation deadline

None

Not in the KEV catalog

Description

### Summary ui 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. A tool result of a few hundred kilobytes, crafted with many unterminated escape sequences, can occupy the event loop for tens of seconds to minutes, delaying every other request and agent run in the process. ### Details This affects applications that set `strip_ansi=True` on `ToolOutputLimits` (named `OverflowingToolOutput` before 0.13.0) and run tools whose output an attacker can influence, such as shell commands, file reads, fetched pages or MCP servers. Stripping runs on the event loop before the capability reduces the output, so its own size limits do not bound it. The assumed attacker can place text in content a tool returns. ### 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. Upgrade to Pydantic AI v2 and `pydantic-ai-harness` 0.70.0, or leave `strip_ansi` off.

Weakness: CWE-1333

Patching and mitigation

Patch status
Unknown: no source documents a fix
Mitigation
None documented
Vendor guidance
github.com (opens in a new tab)

Affected products

VendorProductAffected versionsFixed inPer
pydanticpydantic-ai-harnessfrom 0.4.0 up to and including 0.69.0Not documentedCVE Program

Timeline

  1. Disclosure

    CVE record published by Pydantic

    Source: CVE Program (opens in a new tab)

Vendor guidance and references