Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessInfluence attacker-controlled tool output
-
ExploitReturn line with many unterminated ANSI escapes
-
ExecutionTrigger quadratic ANSI-strip regex on event loop
-
ImpactBlock 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
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).
Primary rating from Vendor (Pydantic).
CVSS VectorVendor: Pydantic
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
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.
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
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
n8n-workflows Main Commit ee25413 allows attackers to execute a directory traversal via the download_workflow function w
Pydantic AI versions 0.0.26 through 1.55.x contain a server-side request forgery vulnerability in URL download functiona
Regular expression denial of service in Pydanic < 2.4.0, < 1.10.13 allows remote attackers to cause denial of service vi
HTTPX2's SOCKS5 proxy implementation omits TLS negotiation for WebSocket Secure (wss://) origins, exposing the full WebS
Cross-site request forgery in Pydantic AI's development web chat UI allows any website a developer happens to visit whil
Concurrency slot exhaustion in Pydantic AI 2.10.0 through 2.52.x lets streamed model requests permanently occupy slots i
Memory exhaustion via unbounded decompression in HTTPX2 (all versions before 2.12.0) allows any HTTP server the client c
Pydantic is a data validation and settings management using Python type hinting. Rated high severity (CVSS 7.5), this vu
Quadratic-time validation of untrusted ISO 8601 duration strings in Pydantic V1 lets remote attackers exhaust CPU by sub
Denial of service in Pydantic V1 arises when an application validates attacker-supplied lists into a field constrained w
Server-Side Request Forgery in Pydantic AI (versions 1.56.0-1.101.0, 2.0.0b1, 2.0.0b2) allows unauthenticated network at
Server-side request forgery in Pydantic AI's URL-fetching guards lets an application that has explicitly opted a URL int
EUVD-2026-130213
GHSA-wvp9-4g4g-qwgm
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB