CVE-2026-107289
JSON

6.8medium

Pydantic AI: SSRF cloud-metadata blocklist bypass via IPv6 zone identifier (incomplete fix for CVE-2026-46678 and CVE-2026-48782)

Severity
6.8medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.32% (higher than 27% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-vmxc-h2x2-jmf3PYSEC-2026-4282PYSEC-2026-4291

Description

Pydantic AI is a Python agent framework for building applications and workflows with Generative AI. From 1.56.0 until 1.107.6 and 2.44.0, applications that opt attacker-influenced URLs into local network access through FileUrl with force_download='allow-local' or web_fetch_tool with allow_local_urls=True can bypass the cloud-metadata blocklist by appending an IPv6 zone identifier to an IPv6 metadata address. IPv6Address equality and hashing include the zone identifier, so the blocklist comparison fails even though the network stack ignores the zone on a non-link-local destination and reaches the metadata service, potentially exposing cloud IAM credentials. The opt-in settings are disabled by default, and the issue requires an IPv6-enabled environment. This issue is fixed in versions 1.107.6 and 2.44.0.

Affected

Product or packageVersionsReported by
pydantic pydantic-ai>= 1.56.0, < 1.107.6, >= 2.0.0b1, < 2.44.0CVE List
pydantic pydantic-ai-slim>= 1.56.0, < 1.107.6, >= 2.0.0b1, < 2.44.0CVE List
pydantic-ai (PyPI)from 1.56.0 before 1.107.6, from 2.0.0b1 before 2.44.0GitHub Advisory Database, PyPA Advisory Database
pydantic-ai-slim (PyPI)from 1.56.0 before 1.107.6, from 2.0.0b1 before 2.44.0GitHub Advisory Database, PyPA Advisory Database
pydantic pydantic_aifrom 1.56.0 before 1.107.6, from 2.0.0 before 2.44.0NVD

All scores

GitHub_M6.8medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N
GitHub6.8medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N
PyPA Advisory Database6.8medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N

Classification

CWE-918CWE-1289

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

Pydantic AI is a Python agent framework for building applications and workflows with Generative AI. From 1.56.0 until 1.107.6 and 2.44.0, applications that opt attacker-influenced URLs into local network access through FileUrl with force_download='allow-local' or web_fetch_tool with allow_local_urls=True can bypass the cloud-metadata blocklist by appending an IPv6 zone identifier to an IPv6 metadata address. IPv6Address equality and hashing include the zone identifier, so the blocklist comparison fails even though the network stack ignores the zone on a non-link-local destination and reaches the metadata service, potentially exposing cloud IAM credentials. The opt-in settings are disabled by default, and the issue requires an IPv6-enabled environment. This issue is fixed in versions 1.107.6 and 2.44.0.

GitHub Advisory Database
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.

References

https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-vmxc-h2x2-jmf3exploit, mitigation, vendor-advisory, web
https://github.com/pydantic/pydantic-ai/pull/8401exploit, patch, vendor-advisory, web
https://github.com/pydantic/pydantic-ai/pull/8402patch, vendor-advisory, web
https://github.com/pydantic/pydantic-ai/commit/02157e1b87bd45d3f2e111ce07afdf89f9fb0e5bexploit, patch, web
https://github.com/pydantic/pydantic-ai/commit/4da70591460f51a8c4f128eaeef70a33340dbd55exploit, patch, web
https://github.com/pydantic/pydantic-ai/releases/tag/v1.107.6patch, release-notes, vendor-advisory, web
https://github.com/pydantic/pydantic-ai/releases/tag/v2.44.0patch, release-notes, vendor-advisory, web
https://github.com/pydantic/pydantic-aipackage
https://pypi.org/project/pydantic-aipackage
https://github.com/advisories/GHSA-vmxc-h2x2-jmf3advisory
https://nvd.nist.gov/vuln/detail/CVE-2026-107289advisory
https://pypi.org/project/pydantic-ai-slimpackage

Sources

SourceRecordLicence
CVE ListCVE-2026-107289 changed 2026-10-08CVE Terms of Use
GitHub Advisory DatabaseGHSA-vmxc-h2x2-jmf3 changed 2026-10-15CC-BY-4.0
NVDCVE-2026-107289 changed 2026-10-13Public domain
PyPA Advisory DatabasePYSEC-2026-4282 changed 2026-10-15CC-BY-4.0
PyPA Advisory DatabasePYSEC-2026-4291 changed 2026-10-15CC-BY-4.0