CVE-2026-107294: CWE-400: Uncontrolled Resource Consumption in pydantic pydantic-ai
Description
### Summary Several remote-content download paths in Pydantic AI buffered the entire HTTP response body into memory before enforcing any size limit. An application that exposes the local web-fetch tool (`web_fetch_tool`, or the `WebFetch` capability's local fallback) to untrusted prompts can be driven to fetch an attacker-chosen URL that streams a very large body, exhausting process memory and crashing the worker. The same unbounded buffering applied to `FileUrl` media downloads (`ImageUrl`, `DocumentUrl`, `VideoUrl`, `AudioUrl`). This is an **availability** issue only. SSRF protections (scheme allowlist, private-IP and cloud-metadata blocking) are unaffected; there is no confidentiality or integrity impact. ### Details The download helpers read the full response body before applying content-size controls, so an existing text-length limit only truncated *after* the whole body was already in memory, and media downloads had no wire-level cap at all. A single large response could grow process memory without bound . ### Who Is Affected You are affected if your application registers the local web-fetch tool (or relies on the `WebFetch` capability's local fallback) and exposes the agent to untrusted prompts, or if it downloads large remote `FileUrl`s influenced by untrusted input. Applications that only fetch developer-controlled URLs are not exposed to the model-chosen attack path. ### Remediation Upgrade to `2.24.0` or later (v2) or `1.107.2` or later (v1). Patched versions enforce a default 50 MiB cap on web-fetch and `FileUrl` downloads while streaming; pass `None` to the limit to restore the previous unbounded behavior. ### Credits Identified during internal review of media-download hardening.
CVSS v3.1
Score 6.5medium
Affected software
pydantic
pydantic-ai
pydantic
pydantic-ai-slim
pkg:pypi/pydantic-aiRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Pydantic AI versions >=1.77.0 <1.107.2 and >=2.0.0b1 <2.24.0 contain a CWE-400 uncontrolled resource consumption vulnerability. The web_fetch_tool, WebFetch local fallback, and remote FileUrl media downloads buffer the entire HTTP response body before enforcing content-size limits. An attacker can supply a URL that streams an arbitrarily large response, exhausting memory and causing the worker process to crash. Affected media types include ImageUrl, DocumentUrl, VideoUrl, and AudioUrl. SSRF protections remain effective, limiting impact to availability. The vulnerability is addressed in versions 1.107.2 and 2.24.0.
Potential Impact
The vulnerability allows an attacker to cause denial of service by exhausting process memory and crashing the worker process. There is no impact on confidentiality or integrity. SSRF protections remain effective, so the attack surface is limited to resource exhaustion and availability disruption.
Mitigation Recommendations
Upgrade to pydantic-ai versions 1.107.2 or later, or 2.24.0 or later, where this issue is fixed. No other mitigation is required as the vulnerability is resolved in these versions.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-10-07T15:53:23.586Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6ac7d1292cdf04f6562ba9ac
Added to database: 10/08/2026, 17:21:45 UTC
Last enriched: 10/08/2026, 17:33:58 UTC
Last updated: 10/08/2026, 21:48:54 UTC
Views: 7
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.