Two high-severity ReDoS vulnerabilities in Pydantic AI Harness affected ANSI stripping and default JWT secret redaction; both were fixed in pydantic-ai-harness 0.70.0 and pydantic-ai v2.70.0.
Two high-severity regular-expression denial-of-service vulnerabilities were disclosed for pydantic-ai-harness on November 17, 2026. GHSA-m4cr-m4qc-9hh affected ToolOutputLimits' ANSI-escape stripping, while GHSA-5m5q-5qj4-gx9h affected the default JWT pattern used by redact_secrets.
The advisories described quadratic-time backtracking on attacker-influenced text. A few hundred kilobytes containing many unterminated escape sequences or crafted token-like content could occupy the event loop for tens of seconds to minutes. The JWT pattern is included by default when redact_secrets or secret_data() uses that pattern.
Both issues were fixed in pydantic-ai-harness 0.70.0, released as part of pydantic-ai v2.70.0. Version 2.71.0, released on November 18, was reported to contain no additional fix or regression for either vulnerability.
An illustrative reproduction demonstrated the same vulnerability class with separate vulnerable and fixed regular expressions, but it did not reproduce Pydantic AI's literal source patterns. The broader risk applies to agent runtimes and gateways that run regular expressions over tool output, headers, files or other attacker-influenced text.