The Pydantic AI advisory explains that optional strip_ansi=True applies a potentially quadratic regular expression to attacker-influenced tool output before truncation, risking an event-loop stall. The advisory lists affected versions from 0.4.0 to 0.69.0 and identifies 0.70.0 as the fix in the vulnerable version family. The vulnerability requires the…
Inspect the ClaimsCase · DiggingBeagle record
Pydantic AI Harness ANSI stripping could block other agents through quadratic parsing
The Pydantic AI advisory explains that optional strip_ansi=True applies a potentially quadratic regular expression to attacker-influenced tool output before truncation, risking an event-loop stall.
Published by DiggingBeagle:
The vulnerability requires the optional processing path and sufficiently crafted untrusted text; no widespread outage count is documented. The Pydantic AI advisory explains that optional strip_ansi=True applies a potentially quadratic regular expression to attacker-influenced tool output before truncation, risking an event-loop stall.
Assessment profile
Assessment method- Setting
- research demonstration
- Exploitation
- demonstrated
- Evidence
- Grade B
- Remediation
- patch available
- AI role
- AGAINST AI
Basis and provenance
Maintainer advisory describes a reproducible quadratic regex when strip_ansi is enabled and a fixed 0.70.0 release; active outage count is not known. Impact grade is left null rather than converting a vendor statistic, controlled attack result or unmeasured installed-base exposure into a standardized realized-harm score.
Assessed Nov 19, 2026 using diggingbeagle.assessment/1.
Evidence basis: CLM-DB264-PYDANTIC-ANSI-REGEX-BOUNDARY · CLM-DB264-PYDANTIC-ANSI-REGEX-MECHANISM · GHSA-m4cr-m4qc-9hh3: Pydantic AI ANSI stripping denial of service
At a glance
Output-size truncation cannot protect an agent server when expensive text transformations happen before the truncation boundary.
Read the implicationsObserved production exploitation, the vulnerable task size and other framework versions with the optional feature.
Limits and uncertaintyFull account
The Pydantic AI advisory explains that optional strip_ansi=True applies a potentially quadratic regular expression to attacker-influenced tool output before truncation, risking an event-loop stall.
The advisory lists affected versions from 0.4.0 to 0.69.0 and identifies 0.70.0 as the fix in the vulnerable version family. The vulnerability requires the optional processing path and sufficiently crafted untrusted text; no widespread outage count is documented.
Output-size truncation cannot protect an agent server when expensive text transformations happen before the truncation boundary.
The vulnerable handler applied ANSI escape stripping to untrusted tool output before truncating it. Because complex matching could occupy a shared Python event loop, a single pathological message could delay otherwise unrelated agents in the same harness process. Disabling the optional stripping path avoids this specific regex but does not repair other redaction or parsing paths, including the separate JWT advisory.
Claims & evidence
CLM-DB264-PYDANTIC-ANSI-REGEX-BOUNDARYThe advisory lists affected versions from 0.4.0 to 0.69.0 and identifies 0.70.0 as the fix in the vulnerable version family. The vulnerability requires the optional processing path and sufficiently crafted untrusted text; no widespread outage count is documented.supported
Basis: reported finding
- supportsGHSA-m4cr-m4qc-9hh3: Pydantic AI ANSI stripping denial of serviceprimary disclosure
ANSI text stripping and pre-truncation regex; affected versions and patched 0.70.0
CLM-DB264-PYDANTIC-ANSI-REGEX-MECHANISMThe Pydantic AI advisory explains that optional strip_ansi=True applies a potentially quadratic regular expression to attacker-influenced tool output before truncation, risking an event-loop stall.supported
Basis: reported finding
- supportsGHSA-m4cr-m4qc-9hh3: Pydantic AI ANSI stripping denial of serviceprimary disclosure
ANSI text stripping and pre-truncation regex; affected versions and patched 0.70.0
Implications
Output-size truncation cannot protect an agent server when expensive text transformations happen before the truncation boundary.
Controls and mitigations
- Update pydantic-ai-harness to 0.70.0 or later in the affected release line, and ensure untrusted tool-output size limits apply before expensive parsing.
Unknowns and contradictions
- Observed production exploitation, the vulnerable task size and other framework versions with the optional feature.
Sources and citation
Material revision history
- Nov 19, 2026 · Published version · first publication · revision 266