CVE-2026-133161Pydantic-ai-harness regular expression denial of service (ReDoS)
CVSS score
7.5
High
CVSS 3.1 from 7cec5f2f-3032-4006-8740-31f605ffab5f
Exploit probability (EPSS)
0.41%
0.41% chance of exploitation in the next 30 days, higher than 36.2% of all CVEs.
CISA KEV
Not in KEV
No confirmed exploitation reported by CISA so far.
Official 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.
Source: NVD · CNA: 7cec5f2f-3032-4006-8740-31f605ffab5f
How to fix it, step by step
Check whether you're affected
Find every system running Pydantic-ai-harness and compare its version with the affected versions.
Watch for an official fix
No fix or advisory is listed in the official record yet. Follow the vendor's security announcements; this page updates when one is published.
Was this useful?
How it can be exploited
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Values in red make the vulnerability easier to exploit or more damaging. CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Affected products
| Affected products | Versions |
|---|---|
| pydantic Pydantic-ai-harness | ≥ 0.4.0, ≤ 0.69.0 |
Weakness
- CWE-1333 regular expression denial of service (ReDoS)
Timeline
- Published:
- Last modified:
Frequently asked questions
Is CVE-2026-133161 being exploited?
There is no confirmed exploitation in CISA's KEV catalog so far. Its EPSS score estimates a 0.4% probability of exploitation in the next 30 days.
What is the CVSS score of CVE-2026-133161?
CVE-2026-133161 has a CVSS 3.1 base score of 7.5 (high).
Which versions are affected?
Pydantic Pydantic-ai-harness (≥ 0.4.0, ≤ 0.69.0)
Is there a patch for CVE-2026-133161?
No patch is linked in the official record yet. Watch the vendor's security advisories.
References
Data: NVD, CVE.org (cvelistV5), CISA KEV and FIRST EPSS. Summary written by RedCVE with AI assistance from the official data.