Case · DiggingBeagle record

Pydantic AI JWT-redaction regex allowed untrusted content to stall an agent event loop

A separate Pydantic AI advisory identifies a quadratic JWT-pattern redaction expression reachable through untrusted prompt, tool or output text, allowing CPU exhaustion or a shared event-loop stall.

Published by DiggingBeagle:

Scope

Turning off JWT detection without an equivalent replacement can remove secret-redaction protection, and the advisory does not document successful in-the-wild exploitation. A separate Pydantic AI advisory identifies a quadratic JWT-pattern redaction expression reachable through untrusted prompt, tool or output text, allowing CPU exhaustion or a shared 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 documents quadratic JWT redaction and a 0.70.0 patch; there is no verified population of exploited deployments. 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.

At a glance

Claims & evidence

CLM-DB264-PYDANTIC-JWT-REGEX-BOUNDARYThe maintainers list affected versions from 0.16.0 through 0.69.0 and fixed release 0.70.0. Turning off JWT detection without an equivalent replacement can remove secret-redaction protection, and the advisory does not document successful in-the-wild exploitation.supported

Basis: reported finding

Link to claim
CLM-DB264-PYDANTIC-JWT-REGEX-MECHANISMA separate Pydantic AI advisory identifies a quadratic JWT-pattern redaction expression reachable through untrusted prompt, tool or output text, allowing CPU exhaustion or a shared event-loop stall.supported

Basis: reported finding

Link to claim

Implications

Agent-secret filtering must be both bounded in computational cost and effective at protecting the secrets it is intended to remove.

Controls and mitigations

  • Upgrade to patched pydantic-ai-harness and keep safe, bounded secret redaction active; measure worst-case input processing under adversarial lengths.

Unknowns and contradictions

  • Rate and duration of practical stalls under deployment-sized payload limits.
  • Whether unaffected redaction configurations preserve confidentiality.

Sources and citation

Material revision history

  1. Nov 19, 2026 · Published version · first publication · revision 266