Skip to main content

CVE-2026-107294: CWE-400: Uncontrolled Resource Consumption in pydantic pydantic-ai

0
Medium
Published: 10/08/2026 (10/08/2026, 17:16:28 UTC)
Source: CVE Database V5
Vendor/Project: pydantic
Product: 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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Affected software

pydantic

pydantic-ai

Affected versions
>=1.77.0 <1.107.2>=2.0.0b1 <2.24.0

pydantic

pydantic-ai-slim

Affected versions
>=1.77.0 <1.107.2>=2.0.0b1 <2.24.0
pydantic-ai
pkg:pypi/pydantic-ai
Affected versions
>=1.77.0 <1.107.2>=2.0.0b1 <2.24.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 10/08/2026, 17:33:58 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses