CVE-2026-48782: pydantic-ai: SSRF IPv6 bypass exposes cloud IAM creds
MEDIUMCVE-2026-48782 is a Server-Side Request Forgery (SSRF) in Pydantic AI's cloud-metadata blocklist where five IPv6 transition forms — including NAT64 and ISATAP addresses — bypass the IP-blocking logic introduced in CVE-2026-46678, allowing a crafted URL to reach the cloud instance metadata endpoint (169.254.169.254) and return short-term IAM credentials. This is the third bypass of the same control class (CVE-2026-25580 → CVE-2026-46678 → CVE-2026-48782), signaling a structural gap in how the framework decodes IP representations before blocking rather than an isolated coding mistake. With 393 downstream dependents and CVSS Scope:Changed with Confidentiality:High, successful exploitation on a NAT64-configured Kubernetes cluster or ISATAP-tunneled network can cascade from credential leak to full cloud account compromise. There is no public exploit and this is not in CISA KEV, but the listed Attack Complexity:High reflects the network routing prerequisite — not technical difficulty — meaning any attacker aware of IPv6 transition forms can weaponize this against a qualifying deployment. Upgrade pydantic-ai and pydantic-ai-slim to ≥2.0.0b3 (or ≥1.102.0 for the v1 branch), audit all force_download='allow-local' usages, and enforce egress filtering on 169.254.169.254 at the Kubernetes NetworkPolicy layer.
What is the risk?
Medium-High in qualifying environments despite the 6.8 CVSS score. The vector (AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N) captures that exploitation is scoped beyond the framework itself — cloud IAM credential theft grants attacker access to the broader cloud environment, not just the agent process. Attack complexity is high only because of the network routing prerequisite (NAT64 or ISATAP), not because the bypass technique itself is sophisticated: IPv6 address transition forms are well-documented and trivial to construct. Kubernetes-deployed Pydantic AI agents running in IPv6-only or dual-stack-with-NAT64 clusters, which are increasingly common in enterprise environments, face materially elevated risk. The three-CVE pattern on the same bypass class suggests the blocklist approach is structurally unsound — defense-in-depth at the network egress and IAM layers is the only reliable long-term control.
How does the attack unfold?
What systems are affected?
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| Pydantic AI | pip | — | No patch |
| Pydantic AI | pip | — | No patch |
How severe is it?
What is the attack surface?
What should I do?
6 steps-
Patch: upgrade pydantic-ai and pydantic-ai-slim to ≥2.0.0b3 (v2 branch) or ≥1.102.0 (v1 branch) — fix commit 1add06179ba4de259f7ab977620b697b7209f7e4.
-
Code audit: grep for force_download='allow-local' across all Pydantic AI agent codebases; remove this option or replace with explicit URL allowlists.
-
Network controls: apply Kubernetes NetworkPolicy or iptables/nftables rules to drop outbound traffic from agent pods to 169.254.169.254/32 and all IPv6 transition equivalents (::ffff:169.254.169.254, 64:ff9b::a9fe:a9fe, 64:ff9b:1::/48 range).
-
IMDSv2 enforcement: on AWS, require IMDSv2 (session-oriented) on all EC2 instances and EKS nodes — this adds a PUT-first requirement that most SSRF exploits cannot satisfy without browser-level request control.
-
IAM least privilege: audit and reduce IAM roles attached to agent execution environments; rotate credentials for any environment that was potentially exposed.
-
Detection: enable cloud metadata API access logging (AWS CloudTrail for IMDSv2; GCP metadata server audit logs) and alert on credential issuance from metadata endpoints to unexpected processes.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-48782?
CVE-2026-48782 is a Server-Side Request Forgery (SSRF) in Pydantic AI's cloud-metadata blocklist where five IPv6 transition forms — including NAT64 and ISATAP addresses — bypass the IP-blocking logic introduced in CVE-2026-46678, allowing a crafted URL to reach the cloud instance metadata endpoint (169.254.169.254) and return short-term IAM credentials. This is the third bypass of the same control class (CVE-2026-25580 → CVE-2026-46678 → CVE-2026-48782), signaling a structural gap in how the framework decodes IP representations before blocking rather than an isolated coding mistake. With 393 downstream dependents and CVSS Scope:Changed with Confidentiality:High, successful exploitation on a NAT64-configured Kubernetes cluster or ISATAP-tunneled network can cascade from credential leak to full cloud account compromise. There is no public exploit and this is not in CISA KEV, but the listed Attack Complexity:High reflects the network routing prerequisite — not technical difficulty — meaning any attacker aware of IPv6 transition forms can weaponize this against a qualifying deployment. Upgrade pydantic-ai and pydantic-ai-slim to ≥2.0.0b3 (or ≥1.102.0 for the v1 branch), audit all force_download='allow-local' usages, and enforce egress filtering on 169.254.169.254 at the Kubernetes NetworkPolicy layer.
Is CVE-2026-48782 actively exploited?
No confirmed active exploitation of CVE-2026-48782 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-48782?
1. Patch: upgrade pydantic-ai and pydantic-ai-slim to ≥2.0.0b3 (v2 branch) or ≥1.102.0 (v1 branch) — fix commit 1add06179ba4de259f7ab977620b697b7209f7e4. 2. Code audit: grep for force_download='allow-local' across all Pydantic AI agent codebases; remove this option or replace with explicit URL allowlists. 3. Network controls: apply Kubernetes NetworkPolicy or iptables/nftables rules to drop outbound traffic from agent pods to 169.254.169.254/32 and all IPv6 transition equivalents (::ffff:169.254.169.254, 64:ff9b::a9fe:a9fe, 64:ff9b:1::/48 range). 4. IMDSv2 enforcement: on AWS, require IMDSv2 (session-oriented) on all EC2 instances and EKS nodes — this adds a PUT-first requirement that most SSRF exploits cannot satisfy without browser-level request control. 5. IAM least privilege: audit and reduce IAM roles attached to agent execution environments; rotate credentials for any environment that was potentially exposed. 6. Detection: enable cloud metadata API access logging (AWS CloudTrail for IMDSv2; GCP metadata server audit logs) and alert on credential issuance from metadata endpoints to unexpected processes.
What systems are affected by CVE-2026-48782?
This vulnerability affects the following AI/ML architecture patterns: agent frameworks, cloud-deployed AI agents, Kubernetes AI workloads, multi-tool AI pipelines.
What is the CVSS score for CVE-2026-48782?
CVE-2026-48782 has a CVSS v3.1 base score of 6.8 (MEDIUM).
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0049 Exploit Public-Facing Application AML.T0053 AI Agent Tool Invocation AML.T0055 Unsecured Credentials AML.T0106 Exploitation for Credential Access Compliance Controls Affected
What are the technical details?
Original Advisory
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.
Exploitation Scenario
An adversary identifies a SaaS platform running Pydantic AI agents on a Kubernetes cluster with NAT64 networking enabled (common in IPv6-only enterprise clusters). The agent is configured with force_download='allow-local' to support internal document fetching workflows. The adversary crafts an indirect prompt injection by embedding the URL http://[::169.254.169.254]/latest/meta-data/iam/security-credentials/agent-role inside a document the agent is asked to process. When the agent fetches the URL, Pydantic AI's blocklist checks the IPv6 address against its known-bad list but fails to decode the IPv4-compatible IPv6 form to its underlying 169.254.169.254 value — the request passes through. The NAT64 gateway routes the request to the cloud metadata endpoint, which returns short-term AWS credentials (AccessKeyId, SecretAccessKey, SessionToken) in plaintext JSON. The adversary exfiltrates training data from S3, reads application secrets from AWS Secrets Manager, or escalates privileges within the cloud account — all without direct host network access and using only legitimate cloud API calls that blend into normal CloudTrail activity.
Weaknesses (CWE)
CWE-918 — Server-Side Request Forgery (SSRF): The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N References
- github.com/pydantic/pydantic-ai/commit/1add06179ba4de259f7ab977620b697b7209f7e4 x_refsource_MISC
- github.com/pydantic/pydantic-ai/pull/5596 x_refsource_MISC
- github.com/pydantic/pydantic-ai/releases/tag/v1.102.0 x_refsource_MISC
- github.com/pydantic/pydantic-ai/security/advisories/GHSA-cg7w-rg45-pc59 x_refsource_CONFIRM
Timeline
Related Vulnerabilities
CVE-2026-25580 8.6 pydantic-ai: SSRF allows internal network access
Same package: pydantic-ai CVE-2026-46678 6.8 pydantic-ai: SSRF bypass exposes cloud IAM credentials
Same package: pydantic-ai CVE-2026-25640 5.4 pydantic-ai: Path Traversal enables file access
Same package: pydantic-ai CVE-2025-53767 10.0 Azure OpenAI: SSRF EoP, no auth required (CVSS 10)
Same attack type: Data Extraction CVE-2025-2828 10.0 LangChain RequestsToolkit: SSRF exposes cloud metadata
Same attack type: Data Extraction