Intel

AIKIDO-2026-432278

pydantic-ai-slim is vulnerable to Denial of Service (DoS)

Denial of Service (DoS)GHSA-v2xh-2vp8-57h8 Published Aug 11, 2026

65

Medium Risk

This Affects:

PYTHONpydantic-ai-slim
1.77.0 - 1.107.1
Fixed in 1.107.2
2.0.0 - 2.23.0
Fixed in 2.24.0
Are you affected? Scan for Free

TL;DR

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.

Who does this affect?

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.

Background info

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.

How to fix this

Upgrade the pydantic-ai-slim and/or the pydantic-ai library to the patch version.