CVE-2026-48782·Python vulnerability
Pydantic AI is a Python agent framework for building applications and workflows with Generative AI. In versions 1.56.0 through 1.101.0, 2.0.0b1, and 2.0.0b2, the cloud-metadata blocklist could be bypassed by encoding the metadata IP in an IPv6 transition form that the previous fix, CVE-2026-46678, did not decode, exposing cloud IAM short-term credentials. The previous remediation decoded only IPv4-mapped IPv6, 6to4, and the NAT64 well-known prefix, so the metadata guarantee did not hold for the remaining transition forms: IPv4-compatible IPv6 (::a.b.c.d), the NAT64 RFC 8215 local-use prefix (64:ff9b:1::/48), operator-chosen NAT64 prefixes, and ISATAP. The IPv6 wrapper is then delivered to the underlying IPv4 metadata endpoint. This occurs when an application using Pydantic AI opts a URL into force_download='allow-local' (which disables the default block on private/internal IPs) and runs on a network that actually routes the affected IPv6 transition forms: NAT64-configured networks (IPv6-only or dual-stack-with-NAT64 deployments, including some Kubernetes setups) for the NAT64 variants, or networks with an ISATAP tunnel for ISATAP. A standard dual-stack cloud VM or container does not route these forms and is not affected in practice. The IPv4-compatible and Teredo variants are deprecated and addressed as defense-in-depth. This is an incomplete fix of GHSA-cqp8-fcvh-x7r3 / CVE-2026-46678 (itself a follow-up to CVE-2026-25580). This issue has been fixed in version 2.0.0b3.
- Severity
- medium
- Software
- Python
- Fixed in
- 1.102.0
- Published
- 2026-06-17
Affected versions
From: 1.56.0
Until: 1.102.0
Fixed in: 1.102.0
How to fix this CVE
Update Pydantic AI to version 1.102.0 or later to close a bypass in the cloud-metadata IP blocklist. This vulnerability allows attackers to access cloud IAM credentials on systems running Pydantic AI with force_download='allow-local' enabled and operating on networks with IPv6 transition forms (such as NAT64 or ISATAP). Ensure all instances using Pydantic AI are patched immediately to restore proper IP filtering.
sudo dnf update python3-pydantic-aiDefensia detects this vulnerability
How to check if you are affected
- Check the installed Pydantic AI version: python3 -c "import pydantic_ai; print(pydantic_ai.__version__)"
- Verify if force_download='allow-local' is set in your application code: grep -r "force_download.*allow-local" /path/to/your/app/
- Review network configuration to confirm if IPv6 transition forms (NAT64, ISATAP) are in use: ip -6 route | grep -E "64:ff9b|::ffff|2001::|Teredo"
- Confirm the patch was applied by re-running: python3 -c "import pydantic_ai; print(pydantic_ai.__version__)" and verifying version >= 1.102.0
FAQ
What is CVE-2026-48782?
This vulnerability is an incomplete fix for a previous metadata endpoint bypass in Pydantic AI. Attackers can encode cloud-instance metadata IP addresses using additional IPv6 transition formats (IPv4-compatible IPv6, NAT64 RFC 8215 local-use prefix, ISATAP) to bypass the IP blocklist and retrieve short-term cloud IAM credentials on affected systems.
Is CVE-2026-48782 being actively exploited?
No, this vulnerability is not currently listed on CISA's Known Exploited Vulnerabilities catalog, and no public exploits have been released. However, the attack requires specific network conditions (NAT64 or ISATAP support) which limits but does not eliminate risk.
What versions of Pydantic AI are affected by CVE-2026-48782?
Pydantic AI versions 1.56.0 through 1.102.0 (inclusive) are vulnerable. This includes all 1.x releases in that range and early 2.0.0 beta versions (b1 and b2). Version 1.102.0 and later fixes the issue.
How do I check if my server is vulnerable to CVE-2026-48782?
Run: python3 -c "import pydantic_ai; print(pydantic_ai.__version__)" and compare against version 1.102.0. If your version is lower and your code uses force_download='allow-local', you are vulnerable. Additionally, check if your network supports IPv6 transition forms with: ip -6 route
Does Defensia detect CVE-2026-48782?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Pydantic AI is installed on a monitored server, CVE-2026-48782 will appear in your dashboard with remediation steps.
Related Python CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2026-48782. Free for 1 server.
Get started free