pydantic-ai-slim is vulnerable to Denial of Service (DoS)
65
Medium Risk
Several remote-content download paths in Pydantic AI read the entire HTTP response body into memory before enforcing any size limit. When an application exposes the local web_fetch tool (or its WebFetch local fallback) or downloads FileUrl media such as ImageUrl, DocumentUrl, VideoUrl, and AudioUrl from a URL influenced by untrusted input, a chosen endpoint can stream a very large body that exhausts process memory and crashes the worker. Existing text-length limits only truncated after the whole body was already buffered, and media downloads had no wire-level cap, so a single large or compression-expanded response could grow memory without bound. The fix streams responses and enforces a default 50 MiB cap on both encoded and decoded content.
You are affected if you are using a version that falls within the vulnerable range and your application exposes the local web_fetch tool (or its WebFetch local fallback) or downloads FileUrl media whose URL can be influenced by untrusted input.
pydantic-ai-slim is vulnerable to Denial of Service (DoS) in versions 1.77.0 - 1.107.1 and 2.0.0 - 2.23.0.
Upgrade the pydantic-ai-slim and/or the pydantic-ai library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant