GHSA-cqp8-fcvh-x7r3
PYSEC-2026-2978
PYSEC-2026-2982
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconIdentify app with force_download='allow-local' enabled
-
DeliveryCraft IPv6-encoded metadata endpoint URL
-
ExploitInject URL via untrusted input pathway
-
InstallServer evaluates IPv6 address against IPv4-only blocklist
-
C2Blocklist check passes, SSRF request issued
-
ExecuteCloud metadata endpoint returns IAM credentials
-
ImpactAttacker retrieves credentials from response
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service URL allowlisting, SSRF prevention
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Credential Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires three concurrent conditions: the application must have explicitly set force_download='allow-local' on a FileUrl, ImageUrl, AudioUrl, VideoUrl, or DocumentUrl type; that URL value must be reachable or influenceable by untrusted attacker input; and the server must operate on a dual-stack or IPv6-translated network where IPv6 transition addresses are routed to the underlying IPv4 metadata endpoint. Exploitation is blocked against the bundled high-level integrations (Agent.to_web / clai web, VercelAIAdapter, AGUIAdapter / Agent.to_ag_ui) because these do not propagate force_download from external data. Applications that only download from developer-controlled URLs are not affected regardless of network configuration. The CVSS PR:N rating confirms no authentication to the target application is required once the above opt-in condition is met, but the opt-in itself is the binding constraint that limits the exploitable population to a subset of deployments. |
| Impact | CVSS 3.1 vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N yields 6.8 (High). The high attack complexity (AC:H) directly encodes the non-default precondition: the application must explicitly set force_download='allow-local' on a URL pathway reachable by attacker-controlled input, which is not a default configuration and was deliberately chosen by a developer. Changed scope (S:C) and high confidentiality impact (C:H) reflect that a successful exploit exits the application boundary to access cloud IAM credentials with potential lateral movement consequences. No EPSS score was provided in the input data, so probabilistic exploitation likelihood cannot be quantified; absent that signal, AC:H and the narrow opt-in condition together suggest lower real-world priority than the parent CVE-2026-25580 (AC:L). No CISA KEV listing and no confirmed public exploit code have been identified at time of analysis, consistent with a targeted rather than opportunistic threat profile. Defenders should focus triage on identifying deployments that combine allow-local with user-influenced URL inputs - those are the only genuinely at-risk instances, and the blast radius is high if IAM credentials are obtained. |
| Exploit ScenarioDerived | An attacker who can influence a URL processed by a Pydantic AI application configured with force_download='allow-local' submits an IPv6-encoded cloud metadata address - for example, http://[::ffff:169.254.169.254]/latest/meta-data/iam/security-credentials/ targeting AWS IMDSv1 - which passes the unpatched blocklist because it is evaluated as an IPv6 address rather than a blocked IPv4 address. On a dual-stack or NAT64-enabled host, the network stack routes the request to the underlying metadata endpoint, which returns short-term IAM credentials that the attacker retrieves from the server's response. No public exploit code has been identified at time of analysis, though the IPv6 transition bypass technique is well-documented in SSRF research literature. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 21, 2026
IPv6 transition-form SSRF in Pydantic AI bypasses the cloud-metadata blocklist introduced as a fix for CVE-2026-25580, exposing cloud IAM short-term credentials on dual-stack and translated networks. The bypass affects pydantic-ai and pydantic-ai-slim deployments that explicitly opt FileUrl-family types into force_download='allow-local' on URLs reachable by untrusted input - a materially narrower attack surface than its parent CVE, reflected in the AC:H rating versus the parent's AC:L. CVSS 6.8 (High) with Changed scope captures that a successful attack escapes the application boundary to reach cloud metadata services; no public exploit code and no CISA KEV listing have been identified at time of analysis.
RemediationAI
Upgrade pydantic-ai or pydantic-ai-slim to version 1.99.0 or later, as confirmed by vendor advisory GHSA-cqp8-fcvh-x7r3 (https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-cqp8-fcvh-x7r3); this release extends the blocklist to IPv6 transition forms and additional IANA special-purpose ranges. If immediate upgrade is not feasible, the vendor-documented workaround is to avoid passing force_download='allow-local' on any URL that could be influenced by untrusted input - this eliminates the attack surface entirely at the cost of losing local-download functionality for those URL types. If allow-local is operationally required and patching is delayed, developers must resolve hostnames independently, validate the resolved address against a metadata blocklist that explicitly covers IPv6 transition encodings (IPv4-mapped, 6to4, NAT64 well-known prefix), and only then construct the FileUrl object; this approach is operationally complex and error-prone and should be treated as a temporary bridge only. The bundled integrations (Agent.to_web, VercelAIAdapter, AGUIAdapter) require no remediation action as they do not propagate force_download from external data.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The vulnerability (CWE-918, Server-Side Request Forgery) resides in the URL download handling logic of the pydantic-ai and pydantic-ai-slim Python packages (PyPI identifiers pkg:pip/pydantic-ai and pkg:pip/pydantic-ai-slim). The parent fix for CVE-2026-25580 blocked private and cloud-metadata IPv4 addresses but did not normalize IPv6 transition representations before blocklist evaluation: IPv4-mapped IPv6 (e.g., ::ffff:169.254.169.254), 6to4 addresses (e.g., 2002:a9fe:a9fe::/48 range), and NAT64 well-known prefix forms all route to the same underlying IPv4 endpoint on dual-stack and translated network stacks, circumventing a purely IPv4-aware blocklist. The force_download='allow-local' mode is an explicit developer opt-in permitting downloads from private IP space; the bug is that the cloud-metadata bypass protection within this mode was not extended to IPv6-encoded equivalents of blocked IPv4 addresses. The 1.99.0 fix normalizes all IPv6 transition forms before blocklist evaluation and extends coverage to additional IANA special-purpose ranges.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Primary rating from NVD.
CVSS VectorNVD
Lifecycle Timeline
1DescriptionNVD
Summary
When an application using Pydantic AI opts a URL into force_download='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 force_download='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 force_download from external data:
Agent.to_web/clai webVercelAIAdapterAGUIAdapter/Agent.to_ag_ui
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 force_download='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](mailto:dohyun4466@gmail.com).
Blast Radius
ecosystem impact- 2 pypi packages depend on pydantic-ai (2 direct, 0 indirect)
- 12 pypi packages depend on pydantic-ai-slim (10 direct, 2 indirect)
Ecosystem-wide dependent count for version 1.56.0 and other introduced versions.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.
EUVD-2026-50561
NVD
CVE.org
EPSS
Exploit-DB