๐Ÿ” CVE Alert

CVE-2026-133161

HIGH 7.5

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

CVSS Score
7.5
EPSS Score
0.0%
EPSS Percentile
0th

### 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.

CWE CWE-1333
Vendor pydantic
Product pydantic-ai-harness
Published Nov 19, 2026
Last Updated Nov 19, 2026
Stay Ahead of the Next One

Get instant alerts for pydantic pydantic-ai-harness

Be the first to know when new high vulnerabilities affecting pydantic pydantic-ai-harness are published โ€” delivered to Slack, Telegram or Discord.

Get Free Alerts โ†’ Free ยท No credit card ยท 60 sec setup

CVSS v3 Breakdown

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability

Affected Versions

pydantic / pydantic-ai-harness
0.4.0 โ‰ค 0.69.0

References

NVD โ†— CVE.org โ†— EPSS Data โ†—
github.com: https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-m4cr-m4qc-9hh3

Credits

๐Ÿ” manus-pi ๐Ÿ” manus-use