CVE-2026-133161
Received
Received - Intake
Denial of Service in Pydantic AI Harness ToolOutputLimits
Vulnerability report for CVE-2026-133161, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.
Publication date: 2026-11-19
Last updated on: 2026-11-19
Assigner: 7cec5f2f-3032-4006-8740-31f605ffab5f
Description
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.
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| pydantic-ai-harness | pydantic-ai-harness | 0.70.0 |
| pydantic-ai | pydantic_ai | 2 |
| pydantic-ai | pydantic_ai | to 0.4.0 (exc) |
| pydantic-ai-harness | pydantic-ai-harness | From 0.13.0 (inc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-1333 | The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. |