Skip to content
EventPast event

Pydantic AI fixes two high-severity vulnerabilities in Harness

3 reports1 reporting sourcesLatest report

Start here

AI overview

Pydantic AI released pydantic-ai-harness 0.70.0, fixing two high-severity vulnerabilities. First, when strip_ansi=True is enabled, the time for ToolOutputLimits to remove ANSI escape sequences grows quadratically with line length; when tool output that an attacker can influence contains hundreds of KB of unterminated escape sequences, it can occupy the event loop for tens of seconds to several minutes. Affected versions are 0.4.0 to 0.69.0. Second, the backtracking time of the jwt mode of secret redaction grows quadratically with text length; processing text that an attacker can influence with this mode of redact_secrets or secret_data() is affected. Affected versions are 0.16.0 to 0.69.0. 0.70.0 also includes new features such as StreamGuardrail streaming segment-by-segment screening and multiple fixes.

Generated by AI from reports · Updated 11 days ago

Attention and developments

Attention, hourly

Now 36, 0% in 24 hours·Peak 36 (Nov 22 22:00)

Nov 23Nov 24Nov 25Now 36

Latest developments

2 developments
  1. · 1 report
    Pydantic AI Harness ANSI stripping has a quadratic complexity vulnerability
    Pydantic AI: Pydantic AI Harness ANSI stripping vulnerability fix
  2. · 2 reports
    Pydantic AI Harness JWT redaction regex has a quadratic complexity vulnerability
    Pydantic AI: Pydantic AI fixes DoS vulnerability in JWT redaction regex

Progress timeline

Nov 18
  1. Pydantic AISelected
    Pydantic AI Harness ANSI stripping vulnerability fix

    Pydantic AI's Harness performs ANSI stripping on tool output when strip_ansi=True; the matching pattern used takes time that grows quadratically with line length, so a crafted tool result of a few hundred KB containing many unterminated escape sequences can occupy the event loop for tens of seconds to several minutes, slowing other requests and agent runs in the process. Affected versions are pydantic-ai-harness 0.4.0 to 0.69.0, fixed in 0.70.0. The trigger condition is that strip_ansi is enabled on ToolOutputLimits and the tool output can be influenced by an attacker, such as shell commands, file reads, fetched pages or MCP servers; stripping runs on the event loop before output reduction, so its own size limits cannot constrain it.

  2. Pydantic AISelected
    Pydantic AI fixes DoS vulnerability in JWT redaction regex

    In a security advisory, Pydantic AI disclosed that the backtracking time of Harness's JWT redaction regex grows quadratically with the length of the scanned text, and that a few hundred KB of crafted text can block the event loop for tens of seconds to several minutes, delaying other requests and agent runs in the same process. Affected versions are pydantic-ai-harness 0.16.0 through 0.69.0, fixed in 0.70.0. It is triggered when an application uses redact_secrets or secret_data() with the jwt pattern, which is included by default, and checks text that an attacker can influence, including user prompts checked by InputGuardrail, tool results checked by ToolGuardrail, and model outputs checked by OutputGuardrail; synchronous guardrails run on the event loop. The mitigation is to upgrade to 0.70.0 or later; until then, secret_data(only=[...]) can be used to explicitly specify the required patterns and exclude the jwt pattern.

Date not provided
  1. Date not given
    Pydantic AI
    Pydantic AI v2.70.0 fixes two high-severity vulnerabilities in Harness; malicious input can block the event loop for up to several minutes

    Pydantic AI v2.70.0 fixes two high-severity vulnerabilities in Pydantic AI Harness; the fixed version is pydantic-ai-harness 0.70.0. GHSA-m4cr-m4qc-9hh3: when strip_ansi=True, the pattern in ToolOutputLimits that removes ANSI escape sequences has time cost that grows quadratically with line length; tool output that an attacker can influence can contain hundreds of KB of unterminated escape sequences, which can occupy the event loop for tens of seconds to several minutes. GHSA-5m5q-5qj4-gx9h: backtracking in the jwt mode of secret redaction has time cost that grows quadratically with text length; processing attacker-influenceable text with this mode of redact_secrets or secret_data() (included by default) is affected; after the fix, JWTs whose header segment contains -eyJ are no longer matched. The version also includes new features such as StreamGuardrail streaming segment-by-segment screening and multiple fixes.

Related discussion

No discussion links have been collected for this event yet.

Attention trend

New sources per day

1 in 12 days·most 1 (Nov 18)·today 0

  • Nov 18: 1 new sources (1 outlets, 0 accounts)
  • Nov 19: 0 new sources (0 outlets, 0 accounts)
  • Nov 20: 0 new sources (0 outlets, 0 accounts)
  • Nov 21: 0 new sources (0 outlets, 0 accounts)
  • Nov 22: 0 new sources (0 outlets, 0 accounts)
  • Nov 23: 0 new sources (0 outlets, 0 accounts)
  • Nov 24: 0 new sources (0 outlets, 0 accounts)
  • Nov 25: 0 new sources (0 outlets, 0 accounts)
  • Nov 26: 0 new sources (0 outlets, 0 accounts)
  • Nov 27: 0 new sources (0 outlets, 0 accounts)
  • Nov 28: 0 new sources (0 outlets, 0 accounts)
  • Nov 29: 0 new sources (0 outlets, 0 accounts)

Hourly attention

Current attention 36·Peak in the comparable period 36 (Nov 22 22:00)·Change over the comparable past 24 hours 0%

010203040Nov 2222:00Nov 2317:00Nov 2412:00Nov 2507:00