Skip to main content

Pydantic AI Harness EUVDEUVD-2026-130213

| CVE-2026-133161 HIGH
Inefficient Regular Expression Complexity (ReDoS) (CWE-1333)
2026-11-19 Pydantic GHSA-wvp9-4g4g-qwgm
7.5
CVSS 3.1 · Vendor: Pydantic
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Influence attacker-controlled tool output
  2. Exploit
    Return line with many unterminated ANSI escapes
  3. Execution
    Trigger quadratic ANSI-strip regex on event loop
  4. Impact
    Block asyncio loop, stall concurrent agent runs

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V2 - Validation and Business Logic Regex complexity limits
MITRE ATT&CK

1 technique across 1 tactic: Impact

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires the application to explicitly set strip_ansi=True on the harness ToolOutputLimits capability (named OverflowingToolOutput before 0.13.0); the default value is False and is not affected. Additionally the attacker must be able to place text into content that a tool returns - e.g. shell command output, file reads, fetched web pages, or MCP server responses. The attack works because ANSI stripping runs on the event loop before the capability's own size limits are applied, so those limits do not bound the quadratic cost. Limiting factors: the non-default strip_ansi=True configuration, the need for an attacker-influenceable tool output channel, and a version in the 0.4.0-0.69.0 range; note that on Pydantic AI v1 the harness cannot be upgraded past 0.4.0, so those users must move to Pydantic AI v2 with harness 0.70.0 or leave strip_ansi off.

Impact

This is a CWE-1333 inefficient-regex (ReDoS-style) denial of service in the pydantic-ai-harness ToolOutputLimits ANSI-stripping path. The supplied CVSS 3.1 vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (7.5) models it as network-reachable, low-complexity, unauthenticated with no confidentiality or integrity impact and high availability impact, which matches the described effect of occupying the asyncio event loop for tens of seconds to minutes and stalling every concurrent request and agent run. However, the base vector does NOT capture the key precondition: the quadratic path only runs when an application explicitly sets strip_ansi=True on ToolOutputLimits, which the advisory states is NOT the default (default is False), so AV:N/AC:L/PR:N understates how configuration-gated real exposure is. EPSS is not provided in the input, so exploitation probability cannot be quantified here. KEV status is not present (not listed), and the only reference is the vendor GHSA advisory itself - no public exploit identified at time of analysis, and no proof-of-concept exploit code is referenced. Signals are therefore consistent but modest: the vuln.today Decision label is this_week (not act_now/emergency), impact is availability-only, and exploitation requires both a non-default setting and attacker-influenced tool output. Net assessment: a genuine, patch-worthy availability bug for the specific subset of deployments running strip_ansi=True with attacker-influenceable tool content, but not a blanket emergency for the broader user base that leaves the default in place.

Exploit ScenarioDerived

An application runs the harness with ToolOutputLimits(strip_ansi=True) and executes a tool whose output an attacker can influence (a shell command, file read, fetched web page, or MCP server response). The attacker returns a few hundred kilobytes of a single line packed with many unterminated ANSI escape sequences; because stripping runs on the event loop before the size limit is applied, the quadratic regex pass pins the loop for tens of seconds to minutes, delaying every other request and agent run in the process. No proof-of-concept exploit code is referenced in the available sources.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
No patch listed yet 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Nov 19, 2026

Denial of service in Pydantic AI Harness (pydantic-ai-harness) 0.4.0 through 0.69.0 lets attacker-influenced tool output stall the async event loop, because the ToolOutputLimits ANSI-stripping step runs a pattern whose cost grows quadratically with line length before the capability's own output size limits are applied. Exposure requires a non-default configuration - strip_ansi=True explicitly set on ToolOutputLimits (named OverflowingToolOutput before 0.13.0) - plus an attacker who can place text into content returned by a tool such as shell output, file reads, fetched pages or an MCP server. CVSS 3.1 scores this 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H), with availability as the only impacted pillar; no public exploit code was identified at time of analysis and the issue is not listed as actively exploited.

RemediationAI

Vendor-released patch: pydantic-ai-harness 0.70.0, which contains the corrected ANSI-stripping implementation for ToolOutputLimits; upgrade to 0.70.0 or later (details at https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-m4cr-m4qc-9hh3). If an immediate upgrade is not possible, set strip_ansi to False, which is already the default - the trade-off is that raw ANSI escape sequences will remain in tool output delivered to the model, which may add noise or token overhead but restores bounded processing time. Note that Pydantic AI v1 deployments cannot upgrade the harness beyond 0.4.0, so those users must either migrate to Pydantic AI v2 with pydantic-ai-harness 0.70.0 or leave strip_ansi disabled; the advisory presents these two options as the complete fix, and no other workaround is documented.

Affected VersionsENISA

pydantic-ai-harness 0.4.0 ≤0.69.0

Affected Packages

euvd pydantic_ai_harness no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The root cause class is CWE-1333, inefficient regular expression complexity, in the Python pydantic-ai-harness package distributed via pip (CPE cpe:2.3:a:pydantic:pydantic-ai-harness). The capability that caps tool output sizes also offers optional ANSI escape sequence removal; per the advisory, the stripping pattern's runtime is quadratic in the length of a line, so a result of a few hundred kilobytes constructed with many unterminated escape sequences consumes tens of seconds to minutes of CPU. Because the package is an async Python harness, that work executes on the event loop before the capability trims the output, so the harness's own byte/size limits never bound the pathological cost and every concurrent request and agent run in the same process is delayed. The affected surface is therefore any tool whose returned content an external party can influence: shell command output, file reads, fetched web pages and MCP server responses. The trigger is explicitly the combination of strip_ansi=True and such attacker-controlled content; the sources do not describe any alternative exploitation path, and installations leaving strip_ansi at its default of False are outside the affected configuration.

Know when Pydantic gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (Pydantic) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
vuln.today AI 7.5 HIGH

Attacker-influenced remote tool content deterministically triggers the quadratic strip once the feature is enabled (AV:N/AC:L/PR:N/UI:N); only availability is affected via event-loop stalling (A:H, C:N/I:N).

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (Pydantic).

CVSS VectorVendor: Pydantic

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

DescriptionCVE.org

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.

Technical POC Analysis

Evidence limitation: the supplied evidence is the GitHub advisory text only.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

Pydantic AI Harness versions 0.4.0 through 0.69.0 contain a high-severity denial-of-service vulnerability (CVE-2026-133161) that can be triggered when a non-default ANSI-stripping feature is enabled. An attacker who can influence tool output-such as through shell commands, file reads, fetched web pages, or MCP servers-could cause the async event loop to stall, disrupting AI-driven automation and potentially degrading service availability for dependent business processes. Leadership should prioritize remediation for any production systems using this harness with the vulnerable configuration, as exploitation requires no authentication and availability is the sole impacted pillar.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis; interim mitigations include disabling strip_ansi=True (or OverflowingToolOutput) in ToolOutputLimits, applying pre-processing length limits on tool outputs, and restricting or validating attacker-controllable tool output sources.

Threat Intelligence Overview

EPSS Score
0.4%
Top 64% exploitable
Prevalence
Low
niche Pydantic AI agent-harness library, limited production footprint
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available No
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

CVE-2025-55526 CRITICAL POC
9.1 Aug 26

n8n-workflows Main Commit ee25413 allows attackers to execute a directory traversal via the download_workflow function w

CVE-2026-25580 HIGH POC
8.6 Feb 06

Pydantic AI versions 0.0.26 through 1.55.x contain a server-side request forgery vulnerability in URL download functiona

CVE-2024-3772 HIGH POC
7.5 Apr 15

Regular expression denial of service in Pydanic < 2.4.0, < 1.10.13 allows remote attackers to cause denial of service vi

CVE-2026-84381 HIGH
8.1 Sep 02

HTTPX2's SOCKS5 proxy implementation omits TLS negotiation for WebSocket Secure (wss://) origins, exposing the full WebS

CVE-2026-107295 HIGH
7.6 Oct 08

Cross-site request forgery in Pydantic AI's development web chat UI allows any website a developer happens to visit whil

CVE-2026-107286 HIGH
7.5 Oct 08

Concurrency slot exhaustion in Pydantic AI 2.10.0 through 2.52.x lets streamed model requests permanently occupy slots i

CVE-2026-84382 HIGH
7.5 Sep 02

Memory exhaustion via unbounded decompression in HTTPX2 (all versions before 2.12.0) allows any HTTP server the client c

CVE-2021-29510 HIGH
7.5 May 13

Pydantic is a data validation and settings management using Python type hinting. Rated high severity (CVSS 7.5), this vu

CVE-2026-133421 MEDIUM
6.9 Nov 20

Quadratic-time validation of untrusted ISO 8601 duration strings in Pydantic V1 lets remote attackers exhaust CPU by sub

CVE-2026-133422 MEDIUM
6.9 Nov 20

Denial of service in Pydantic V1 arises when an application validates attacker-supplied lists into a field constrained w

CVE-2026-48782 MEDIUM
6.8 Jun 16

Server-Side Request Forgery in Pydantic AI (versions 1.56.0-1.101.0, 2.0.0b1, 2.0.0b2) allows unauthenticated network at

CVE-2026-107289 MEDIUM
6.8 Oct 08

Server-side request forgery in Pydantic AI's URL-fetching guards lets an application that has explicitly opted a URL int

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy