7.5
HIGH CVSS 3.1
CVE-2026-133161
Harness `ToolOutputLimits` ANSI stripping can take quadratic time, blocking the event loop
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.

INFO

Published Date :

Nov. 19, 2026, 3:17 p.m.

Last Modified :

Nov. 19, 2026, 3:17 p.m.

Remotely Exploit :

Yes !

Source :

7cec5f2f-3032-4006-8740-31f605ffab5f
Affected Products

The following products are affected by CVE-2026-133161 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Pydantic pydantic_ai
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 134c704f-9b21-4f2e-91b3-4a467353bcc0
CVSS 3.1 HIGH MITRE-CVE
CVSS 3.1 HIGH 7cec5f2f-3032-4006-8740-31f605ffab5f
Solution
Upgrade pydantic-ai-harness to 0.70.0 or later to fix slow ANSI sequence stripping.
  • Upgrade pydantic-ai-harness to version 0.70.0 or later.
  • Leave strip_ansi=False if unable to upgrade.
  • Consider upgrading to Pydantic AI v2 if applicable.
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2026-133161.

URL Resource
https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-m4cr-m4qc-9hh3
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-133161 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2026-133161 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2026-133161 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2026-133161 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • New CVE Received by 7cec5f2f-3032-4006-8740-31f605ffab5f

    Nov. 19, 2026

    Action Type Old Value New Value
    Added 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.
    Added CVSS V3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
    Added CWE CWE-1333
    Added Affected New affected value received. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/133xxx/CVE-2026-133161.json">CVE-2026-133161</a>
    Added Reference https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-m4cr-m4qc-9hh3
  • CVE Modified by 134c704f-9b21-4f2e-91b3-4a467353bcc0

    Nov. 19, 2026

    Action Type Old Value New Value
    Added SSVC {'id': 'CVE-2026-133161', 'role': 'CISA Coordinator', 'options': [{'exploitation': 'none'}, {'automatable': 'yes'}, {'technicalImpact': 'partial'}], 'version': '2.0.3', 'timestamp': '2026-11-19T14:45:16.499081Z'}
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.