CVE-2026-107294: Pydantic AI Unbounded Memory Use in Remote Content Downloads

pydantic-ai Updated 08 Oct 2026

Summary

08/10/2026
Yes i
Moderate
6.5

CVE-2026-107294: Pydantic AI: Unbounded memory use when downloading remote content via web_fetch or FileUrl. Affects pydantic-ai across 2 version ranges.

>= 1.77.0, < 1.107.2 >= 2.0.0b1, < 2.24.0

Fixed in 1.107.2 or 2.24.0, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2026-107294 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Pydantic AI is a Python library designed for data validation and settings management using Python type annotations. It allows developers to create complex data models with ease, ensuring data integrity and type safety. However, a recent vulnerability has been identified that exposes applications utilizing Pydantic AI to potential denial-of-service attacks due to unbounded memory usage when downloading remote content.

Vulnerability Detail

The vulnerability arises from the way Pydantic AI handles remote content downloads through its web-fetch tool and FileUrl capabilities. Specifically, the library buffers the entire HTTP response body into memory before applying any size limits. This means that if an attacker provides a URL that streams a very large response, it can lead to excessive memory consumption, potentially crashing the application. This issue is classified as an availability concern, as it does not affect the confidentiality or integrity of the data being processed.

How To Fix

Latest published version: 2.60.0 as of 23 Oct 2026

pip install --upgrade "pydantic-ai==2.60.0"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • >= 1.77.0, < 1.107.2 1.107.2
    pip install --upgrade "pydantic-ai==1.107.2"
  • >= 2.0.0b1, < 2.24.0 2.24.0
    pip install --upgrade "pydantic-ai==2.24.0"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary workaround, you can set a content-size limit when using the web-fetch tool or FileUrl capabilities. For example, you can specify a limit like this:

web_fetch_tool(url, limit=50 * 1024 * 1024) # Limit to 50 MiB

Alternatively, if you want to restore the previous unbounded behavior, you can pass None to the limit parameter.

Conclusion

In summary, CVE-2026-107294 highlights a significant vulnerability in Pydantic AI related to unbounded memory usage during remote content downloads. It is crucial for developers to upgrade to the patched versions to mitigate the risk of denial-of-service attacks. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for pydantic-ai →

Share this vulnerability

FAQ

The vulnerability allows for unbounded memory usage when downloading remote content, which can lead to application crashes.

Applications that expose the local web-fetch tool to untrusted prompts or download large remote FileUrls influenced by untrusted input are affected.

The primary consequence is denial of service due to excessive memory consumption, which can crash the application.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.

The CVSS score of this vulnerability is 6.5, indicating a moderate severity level.

Related vulnerabilities

Recent vulnerabilities recorded for pydantic-ai.

How To Fix

Latest published version: 2.60.0 as of 23 Oct 2026

pip install --upgrade "pydantic-ai==2.60.0"

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • >= 1.77.0, < 1.107.2 1.107.2
    pip install --upgrade "pydantic-ai==1.107.2"
  • >= 2.0.0b1, < 2.24.0 2.24.0
    pip install --upgrade "pydantic-ai==2.24.0"

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback