CVE-2026-133161 json
Harness `ToolOutputLimits` ANSI stripping can take quadratic time, blocking the event loop
published 3d ago modified yesterday also EUVD-2026-130213 , GHSA-m4cr-m4qc-9hh3
Unreviewed: the maintainers' own advisory
Published by the maintainers on their GitHub repository pydantic/pydantic-ai. GitHub has not reviewed it into the GitHub Advisory Database, so the affected packages and versions are the maintainers' word. Read the full advisory on GitHub.
- cvss
- 7.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 36%
- public exploits
- 0
- none known
Summary
### 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.
Is CVE-2026-133161 in your stack? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCISA SSVC
- Exploitation
- none
- Automatable
- yes
- Technical impact
- partial
- Assessed
- yesterday
Exploit prediction
0.41% chance of exploitation in the next 30 days, higher than 36% of all scored CVEs (FIRST EPSS, 2026-11-20).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Inferred packages
No advisory lists a package for this vulnerability yet. The CVE names these as products and links their GitHub repository, and the package registry names the same repository, so they are probably the affected packages. Low confidence: the versions are the CVE’s own for the product, and a stack check reports the package as unchecked when there are none.
| ecosystem | package | repository | affected |
|---|---|---|---|
| pypi | pydantic-ai-harness | pydantic/pydantic-ai | >= 0.4.0, <= 0.69.0 |
Affected products
- pydantic pydantic-ai-harness
Classification
- Weakness
-
- CWE-1333 Inefficient Regular Expression Complexity
References
-
github.com
/pydantic/pydantic-ai/security/advisories/GHSA-m4cr-m4qc-9hh3
vendor-advisory, advisory
Sources
- CVE List CVE-2026-133161
- NVD CVE-2026-133161
- Maintainer advisory GHSA-m4cr-m4qc-9hh3
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
The maintainers of pydantic/pydantic-ai published their own advisory on GitHub. Reviewed sources take precedence over it.