{"id":"CVE-2026-46678","aliases":["CVE-2026-46678","GHSA-cqp8-fcvh-x7r3","PYSEC-2026-2978","PYSEC-2026-2982"],"related":[],"kind":"vulnerability","state":"published","title":"Pydantic AI: SSRF cloud-metadata blocklist bypass via IPv4-mapped IPv6 (Incomplete fix of CVE-2026-25580)","summary":"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 force_download='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 force_download='allow-local' on a URL influenced by untrusted input; it is not affected when using bundled integrations to ingest user input (Agent.to_web / clai web, VercelAIAdapter, AGUIAdapter / Agent.to_ag_ui), since they do not propagate force_download from external data, nor when downloading only from developer-controlled URLs. This issue has been fixed in version 1.99.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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 force_download='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 force_download='allow-local' on a URL influenced by untrusted input; it is not affected when using bundled integrations to ingest user input (Agent.to_web / clai web, VercelAIAdapter, AGUIAdapter / Agent.to_ag_ui), since they do not propagate force_download from external data, nor when downloading only from developer-controlled URLs. This issue has been fixed in version 1.99.0.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nWhen 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.\n\nThis is an incomplete fix of [GHSA-2jrp-274c-jhv3](https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-2jrp-274c-jhv3) / [CVE-2026-25580](https://nvd.nist.gov/vuln/detail/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.\n\n## Severity\n\nSame 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.\n\n## Who Is Affected\n\nApplications 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.\n\nApplications 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:\n\n- `Agent.to_web` / `clai web`\n- `VercelAIAdapter`\n- `AGUIAdapter` / `Agent.to_ag_ui`\n\nApplications that only download from developer-controlled URLs are not affected.\n\n## Remediation\n\nUpgrade 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.\n\n## Workaround for Unpatched Versions\n\nAvoid 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`.\n\n## Credits\n\nReported by [j0hndo](mailto:dohyun4466@gmail.com).","format":"markdown","source":"ghsa"}],"published":"2026-05-21T21:35:18.000Z","modified":"2026-08-04T13:52:14.037Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","score":6.8,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","score":6.8,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","score":6.8,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N","score":5.9,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N","score":6.8,"rating":"MEDIUM"}],"cwes":["CWE-918"],"affected":[{"ranges":[{"version":">= 1.56.0, < 1.99.0","status":"affected"}],"vendor":"pydantic","product":"pydantic-ai","source":"cvelist"},{"ranges":[{"version":">= 1.56.0, < 1.99.0","status":"affected"}],"vendor":"pydantic","product":"pydantic-ai-slim","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"1.56.0","status":"affected","fixed":"1.99.0"}],"ecosystem":"PyPI","package":"pydantic-ai","purl":"pkg:pypi/pydantic-ai","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"1.56.0","status":"affected","fixed":"1.99.0"}],"ecosystem":"PyPI","package":"pydantic-ai-slim","purl":"pkg:pypi/pydantic-ai-slim","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"1.56.0","fixed":"1.99.0"}],"vendor":"pydantic","product":"pydantic_ai","cpe":"cpe:2.3:a:pydantic:pydantic_ai:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"1.56.0","status":"affected","fixed":"1.99.0"}],"ecosystem":"PyPI","package":"pydantic-ai","purl":"pkg:pypi/pydantic-ai","source":"pysec"},{"ranges":[{"type":"ecosystem","introduced":"1.56.0","status":"affected","fixed":"1.99.0"}],"ecosystem":"PyPI","package":"pydantic-ai-slim","purl":"pkg:pypi/pydantic-ai-slim","source":"pysec"}],"references":[{"url":"https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-cqp8-fcvh-x7r3","tags":["vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/pydantic/pydantic-ai/releases/tag/v1.99.0","tags":["product","release-notes","x-refsource-misc"],"sources":["cvelist","nvd"]},{"url":"https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-2jrp-274c-jhv3","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/pydantic/pydantic-ai","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/pydantic-ai","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-cqp8-fcvh-x7r3","tags":["advisory"],"sources":["pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46678","tags":["advisory"],"sources":["pysec"]},{"url":"https://pypi.org/project/pydantic-ai-slim","tags":["package"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-07-30T14:37:14.496Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-46678","url":"https://www.cve.org/CVERecord?id=CVE-2026-46678","licence":"CVE Terms of Use","modified":"2026-07-30T14:37:27.447Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-cqp8-fcvh-x7r3","url":"https://github.com/advisories/GHSA-cqp8-fcvh-x7r3","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:22.591Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-46678","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-46678","licence":"Public domain","modified":"2026-08-04T13:52:14.037Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2978","url":"https://osv.dev/vulnerability/PYSEC-2026-2978","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:22.591Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2982","url":"https://osv.dev/vulnerability/PYSEC-2026-2982","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:22.591Z"}],"updatedAt":"2026-11-25T22:59:30.487Z","epss":{"score":0.00419,"percentile":0.38174,"date":"2026-12-01T12:00:22.000Z"}}