GHSA-v2xh-2vp8-57h8: SSRF

Published Oct 8, 2026
·
Updated

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 (webfetchtool, 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 FileUrls 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.

Affected Software

4 affected componentsFixes available
pip/pydantic-ai-slim>=2.0.0b1<=2.23.0
2.24.0
pip/pydantic-ai-slim>=1.77.0<1.107.2
1.107.2
pip/pydantic-ai>=2.0.0b1<=2.23.0
2.24.0
pip/pydantic-ai>=1.77.0<1.107.2
1.107.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/pydantic-ai-slim to a version that resolves this vulnerability.

    Fixed in 2.24.0
  2. Upgrade

    Upgrade pip/pydantic-ai-slim to a version that resolves this vulnerability.

    Fixed in 1.107.2
  3. Upgrade

    Upgrade pip/pydantic-ai to a version that resolves this vulnerability.

    Fixed in 2.24.0
  4. Upgrade

    Upgrade pip/pydantic-ai to a version that resolves this vulnerability.

    Fixed in 1.107.2
  5. Upgrade

    Upgrade Pydantic AI to a version that resolves this vulnerability.

    Fixed in 2.24.0
  6. Upgrade

    Upgrade Pydantic AI to a version that resolves this vulnerability.

    Fixed in 1.107.2

Event History

Oct 8, 2026
Advisory Published
via GitHub·05:16 PM
Data Sourced
via GitHub·05:16 PM
DescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

Which deployments are realistically exposed?

Applications are affected when they register the local web-fetch tool or use the WebFetch capability's local fallback and expose the agent to untrusted prompts. FileUrl media downloads, including ImageUrl, DocumentUrl, VideoUrl, and AudioUrl, also used the unbounded download behavior.

2

What does an attacker need to cause an outage?

An attacker needs a way to drive the agent to fetch an attacker-chosen URL. A response that streams a very large body can exhaust worker memory and crash the process.

3

Does this weaken SSRF protections or expose data?

No. Scheme allowlisting and blocking of private IP addresses and cloud-metadata endpoints are unaffected, and the issue has no stated confidentiality or integrity impact; it is limited to availability.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203