News · Pydantic AI · 2 min read
Event date: · Published:
Pydantic AI patches high-severity ReDoS flaw in its agent harness
Pydantic AI disclosed a high-severity denial-of-service flaw in its agent harness, fixed in pydantic-ai-harness 0.70.0, with no fix yet for v1.
Pydantic AI disclosed a high-severity denial-of-service vulnerability in its agent harness on November 19, 2026, when GitHub Security Advisories published the GitHub Security Advisories listing for GHSA-wvp9-4g4g-qwgm, also tracked as CVE-2026-133161. The flaw lets a crafted tool result stall an agent's event loop for tens of seconds to minutes.
The vulnerability in detail
- The advisory is tracked as GHSA-wvp9-4g4g-qwgm and CVE-2026-133161
- Severity is rated High with a CVSS score of 7.5, classified under CWE-1333 (Inefficient Regular Expression Complexity)
- The flaw sits in
ToolOutputLimitswhenstrip_ansiis set toTrue, which runs an ANSI-escape-stripping regex with exponential worst-case complexity - A tool result of only a few hundred kilobytes, crafted with many unterminated escape sequences, can occupy the event loop for tens of seconds to minutes
- This can block other requests and agent operations, creating a denial-of-service condition
- The fix ships in pydantic-ai-harness version 0.70.0 or later, but only for Pydantic AI v2
What it means for people building with AI
Pydantic AI is a widely used Python agent framework, and this case shows that agent harnesses processing untrusted tool output can be pushed into denial-of-service without any classic injection or remote-code-execution vector. Anyone building agents, regardless of framework, should check how tool output is parsed and whether similar inefficient regular expressions are in play.
Fix availability and mitigation
No fix is available for Pydantic AI v1, whose harness is capped at version 0.4.0. Developers who cannot upgrade can mitigate the issue by disabling strip_ansi, which already defaults to False.
Sources
- Pydantic AI Harness ReDoS via ANSI-stripping regex in ToolOutputLimits (GitHub Security Advisories, November 19, 2026, official)
Written with AI assistance, strictly from the sources listed above. Before it went live, automated checks verified its dates, sources and every language edition.