Mittel

Pydantic AI: SSRF cloud-metadata blocklist bypass via IPv6 zone identifiers

  • Veröffentlicht: 08.10.2026
  • Aktualisiert: 15.10.2026 18:17

Summary

When an application using Pydantic AI opts a URL into local network access — either a FileUrl with force_download='allow-local', or web_fetch_tool(allow_local_urls=True) — the cloud-metadata blocklist could be bypassed by appending an IPv6 zone identifier to a metadata address (for example fd00:ec2::254%251). The host ignores the zone identifier on a destination that is not link-local and delivers the request to the metadata endpoint anyway, exposing cloud IAM short-term credentials.

This is an incomplete fix of GHSA-cqp8-fcvh-x7r3 / CVE-2026-46678 and GHSA-cg7w-rg45-pc59 / CVE-2026-48782, themselves follow-ups to CVE-2026-25580. The parent advisory's remediation guaranteed that cloud metadata endpoints are always blocked, even with local access allowed. That guarantee did not hold for zone-scoped spellings of the IPv6 metadata endpoints.

Details

The cloud-metadata guard compared IPv6 addresses against its blocklist by set membership. Python includes the zone identifier in IPv6Address equality and hashing, so a zone-scoped spelling of a blocked address did not match, while the network stack ignores the zone identifier for a destination that is not link-local. The private-range checks, and the IPv4 and transition-form metadata checks, were already unaffected, because they compare by network containment and by packed bytes respectively.

Only the IPv6 cloud metadata endpoints were reachable this way, so the issue requires an IPv6-enabled environment — for example AWS EC2 or EKS with IPv6, GCP IPv6-only instances, or Scaleway.

Who Is Affected

You are affected only if your application opts a URL that is, or could be, influenced by untrusted input into local network access, through either:

  • a FileUrl (ImageUrl, AudioUrl, VideoUrl, DocumentUrl) with force_download='allow-local'; or
  • web_fetch_tool(allow_local_urls=True), where the model chooses the URL.

Both are off by default.

You are not affected through the FileUrl path if you use any of the bundled integrations to ingest user input, because they do not propagate force_download from external data:

  • Agent.to_web / clai web
  • VercelAIAdapter
  • AGUIAdapter / Agent.to_ag_ui

web_fetch_tool is configured by your own application, so a client cannot turn on allow_local_urls.

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

Remediation

Upgrade to a patched version. The cloud-metadata and private-IP checks now drop an IPv6 zone identifier before evaluating the address, so every blocklist comparison is made on the address itself. A zone identifier is still carried on the connection, so legitimate link-local fetches under local network access continue to work.

Workaround for Unpatched Versions

Avoid opting into local network access — force_download='allow-local' or web_fetch_tool(allow_local_urls=True) — on any URL that could be influenced by untrusted input. If you must, reject URL hosts containing % before constructing the FileUrl or configuring the tool.

Credits

Reported by @euriconicacio.

Betroffene Software

Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.

PlattformPaketAnfällige VersionenBehoben in
Python (PyPI) pydantic-ai >= 1.56.0, < 1.107.6, >= 2.0.0b1, < 2.44.0 1.107.6, 2.44.0
Python (PyPI) pydantic-ai-slim >= 1.56.0, < 1.107.6, >= 2.0.0b1, < 2.44.0 1.107.6, 2.44.0

Verweise

CVSS-Wert 6.8/10
CVSS-Vektor
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N
Schwäche (CWE)
CWE-1289, CWE-918
Plattform
Python (PyPI)
Paket
pydantic-ai, pydantic-ai-slim
Veröffentlicht
08.10.2026
Aktualisiert
15.10.2026 18:17

Quellen und Lizenzen

OSV / GitHub Advisory Database - PYSEC-2026-4282 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-vmxc-h2x2-jmf3 - CC BY 4.0

OSV / GitHub Advisory Database - PYSEC-2026-4291 - PyPA Advisory Database; CC BY 4.0

Schwachstellenhistorie: pydantic-ai-slim

Alle veröffentlichten Schwachstellen dieses Pakets (Python (PyPI)), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.

Alle (14) im Archiv
Einträge insgesamt
14
Erste → letzte
02.2026 10.2026
Ohne Fix
0
In Angriffen ausgenutzt
0

Verteilung nach Schweregrad

  • Hoch 4
  • Mittel 8
  • Niedrig 2

Veröffentlichungen pro Jahr

  1. 2026: 14
Schweregrad:
  1. Pydantic AI: SSRF cloud-metadata blocklist bypass via IPv6 zone identifiers dieser Eintrag
    Mittel · 6.8 CVE-2026-107289 >= 1.56.0, < 1.107.6, >= 2.0.0b1, < 2.44.0 1.107.6, 2.44.0
  2. Hoch · 7.1 CVE-2026-25640 >= 1.34.0, < 1.51.0 1.51.0
  3. Hoch · 8.6 CVE-2026-25580 >= 0.0.26, < 1.56.0 1.56.0

Erkennen Sie Schwachstellen in Ihrer Anwendung

Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.

Anwendung verbinden
DockRay Newsletter

Anwendungssicherheit in Ihrem Postfach

Wichtige Schwachstellen, konkrete Empfehlungen und praktische Tipps für Ihre Anwendungen. Wählen Sie Ihre Technologien und verfolgen Sie, was für Ihr Projekt relevant ist.

  • Eine tägliche Zusammenfassung neuer Schwachstellen, auch kritischer.
  • Benachrichtigungen über wichtige Updates.
  • Praktische Tipps zur Sicherheit und Überwachung von Anwendungen.

Leer lassen, um Meldungen zu allen Technologien zu erhalten.

Kostenlos anmelden. In jeder E-Mail mit einem Klick abmelden.