Skip to content
High 7.5

pydantic-ai-harnessのToolOutputLimitsに脆弱性、サービス妨害のおそれ

CVE-2026-133161 First seen on SecPulse

Summary

pydantic-ai-harnessのToolOutputLimitsでは、strip_ansiをTrueにすると、ツール出力のANSIエスケープシーケンス除去処理に時間がかかり、イベントループを数十秒から数分占有されるおそれがあります。影響するのは0.4.0から0.69.0までの版で、0.70.0以降に更新すると解消されます。Pydantic AI v1を使っている場合はv2への移行が必要です。更新できるまではstrip_ansiをFalseのままにしてください。

AI summary

Produced by SecPulse using an external AI model; it may contain mistakes. Check the original description and references below before acting on it.

pydantic-ai-harnessのToolOutputLimitsでは、strip_ansiをTrueにすると、ツール出力のANSIエスケープシーケンス除去処理に時間がかかり、イベントループを数十秒から数分占有されるおそれがあります。影響するのは0.4.0から0.69.0までの版で、0.70.0以降に更新すると解消されます。Pydantic AI v1を使っている場合はv2への移行が必要です。更新できるまではstrip_ansiをFalseのままにしてください。

Affected packages

PackageAffected → Fixed
pydanticpydantic-ai-harness
0.4.0 – 0.69.0→ Not listed

This record does not list fixed versions. Check the article or the vendor advisory in the references for whether and where it is fixed.

Original description The description as published by the source.

Summary ui

With strip_ansi=True, Pydantic AI Harness's ToolOutputLimits capability removes ANSI escape sequences from tool output with a pattern that takes time quadratic in the length of a line. A tool result of a few hundred kilobytes, crafted with many unterminated escape sequences, can occupy the event loop for tens of seconds to minutes, delaying every other request and agent run in the process.

Details

This affects applications that set strip_ansi=True on ToolOutputLimits (named OverflowingToolOutput before 0.13.0) and run tools whose output an attacker can influence, such as shell commands, file reads, fetched pages or MCP servers. Stripping runs on the event loop before the capability reduces the output, so its own size limits do not bound it.

The assumed attacker can place text in content a tool returns.

Mitigation

Upgrade pydantic-ai-harness to 0.70.0 or later. Until then, leave strip_ansi at its default, False.

On Pydantic AI v1, the harness cannot be upgraded past 0.4.0. Upgrade to Pydantic AI v2 and pydantic-ai-harness 0.70.0, or leave strip_ansi off.

Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details