CVE-2026-46678: Pydantic AI: SSRF cloud-metadata blocklist bypass via IPv4-mapped IPv6 (Incomplete fix of CVE-2026-25580)

Published May 21, 2026
·
Updated

Summary

When an application using Pydantic AI opts a URL into forcedownload='allow-local' (which disables the default block on private/internal IPs), the cloud-metadata blocklist could be bypassed by encoding the metadata IP in an IPv6 transition form (IPv4-mapped IPv6, 6to4, or NAT64). Dual-stack and translated networks route the IPv6 wrapper to the underlying IPv4 endpoint, exposing cloud IAM short-term credentials.

This is an incomplete fix of GHSA-2jrp-274c-jhv3 / CVE-2026-25580. The parent advisory's remediation guaranteed that "cloud metadata endpoints are always blocked, even with allow-local." That guarantee did not hold for IPv6-encoded forms of the metadata IPs.

Severity

Same impact metrics as the parent CVE, but materially narrower attack surface (AC:H instead of AC:L), because exploitation requires the application to have opted into allow-local on a URL influenced by untrusted input.

Who Is Affected

Applications are affected only if they explicitly opt for FileUrl (ImageUrl, AudioUrl, VideoUrl, DocumentUrl) into forcedownload='allow-local' on a URL that is, or could be, influenced by untrusted input.

Applications are not affected if they use any of the bundled integrations to ingest user input, because they do not propagate forcedownload from external data:

- Agent.toweb / clai web - VercelAIAdapter - AGUIAdapter / Agent.toagui

Applications that only download from developer-controlled URLs are not affected.

Remediation

Upgrade to 1.99.0 or later. The cloud-metadata and private-IP blocklists now apply to IPv6 transition forms that route to a blocked IPv4 endpoint (IPv4-mapped IPv6, 6to4, and NAT64 well-known prefix). The blocklists have also been extended to cover additional IANA-reserved IPv4 and IPv6 special-purpose ranges.

Workaround for Unpatched Versions

Avoid passing forcedownload='allow-local' on any URL that could be influenced by untrusted input. If developers must, resolve the hostname themselves and validate the result against their own metadata blocklist — including IPv6-encoded forms — before constructing the FileUrl.

Credits

Reported by j0hndo.

Other sources

Pydantic AI is a Python agent framework for building Generative AI applications. In versions 1.56.0 through 1.98.0, when an application opts a URL into forcedownload='allow-local' (disabling the default block on private/internal IPs), the cloud-metadata blocklist could be bypassed by encoding the metadata IP in an IPv6 transition form (IPv4-mapped IPv6, 6to4, or NAT64), exposing cloud IAM short-term credentials on dual-stack or translated networks. This is an incomplete fix of GHSA-2jrp-274c-jhv3 / CVE-2026-25580, whose remediation did not hold for IPv6-encoded forms of the metadata IPs. An application is affected only if it explicitly opts a FileUrl (ImageUrl, AudioUrl, VideoUrl, DocumentUrl) into forcedownload='allow-local' on a URL influenced by untrusted input; it is not affected when using bundled integrations to ingest user input (Agent.toweb / clai web, VercelAIAdapter, AGUIAdapter / Agent.toagui), since they do not propagate forcedownload from external data, nor when downloading only from developer-controlled URLs. This issue has been fixed in version 1.99.0.

MITRE

Affected Software

3 affected componentsFixes available
pip/pydantic-ai-slim>=1.56.0<1.99.0
1.99.0
pip/pydantic-ai>=1.56.0<1.99.0
1.99.0
Pydantic Pydantic Ai Python>=1.56.0<1.99.0

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 1.99.0
  2. Upgrade

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

    Fixed in 1.99.0
  3. Upgrade

    Upgrade Pydantic AI to a version that resolves this vulnerability.

    Fixed in 1.99.0
  4. Configuration

    Avoid passing force_download='allow-local' on any FileUrl/ImageUrl/AudioUrl/VideoUrl/DocumentUrl URL that could be influenced by untrusted input; do not disable the default block on private/internal IPs for untrusted URLs.

    Pydantic AI FileUrl (ImageUrl/AudioUrl/VideoUrl/DocumentUrl) force_download = Do not set to 'allow-local'
  5. Compensating control

    If developers must use force_download='allow-local', resolve the hostname themselves and validate the result against their own metadata IP blocklist, including IPv6-encoded forms (e.g., IPv4-mapped IPv6, 6to4, NAT64), before constructing the FileUrl.

Event History

May 21, 2026
Advisory Published
via GitHub·09:35 PM
Data Sourced
via GitHub·09:35 PM
DescriptionSeverityWeaknessAffected Software
Jul 29, 2026
CVE Published
via MITRE·08:16 PM
Data Sourced
via MITRE·08:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·09:17 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-46678?

CVE-2026-46678 has a medium severity rating of 6.8.

2

How do I fix CVE-2026-46678?

To fix CVE-2026-46678, avoid opting URLs into `force_download='allow-local'` and ensure proper validation of IP addresses.

3

What type of vulnerability is CVE-2026-46678?

CVE-2026-46678 is classified as a Server-Side Request Forgery (SSRF) vulnerability.

4

Which software is affected by CVE-2026-46678?

CVE-2026-46678 affects the Pydantic AI and Pydantic AI Slim packages.

5

What can be exploited in CVE-2026-46678?

CVE-2026-46678 can be exploited to bypass the cloud-metadata blocklist, allowing unauthorized access to internal services.

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