CVE-2026-107289: Pydantic AI SSRF Cloud-metadata Blocklist Bypass Vulnerability
MODERATECVE-2026-107289 is a MODERATE (CVSS 6.8) ssrf cloud-metadata blocklist bypass vulnerability (CWE-1289: Improper Validation of Unsafe Equivalence in Input) affecting Pydantic AI libraries in the PyPI ecosystem. The issue involves ssrf cloud-metadata blocklist bypass via ipv6 zone identifiers. Remediation is available by upgrading affected packages to version 1.107.6, 2.44.0.
CVE-2026-107289 at a Glance
Security Impact
CVSS: 6.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N).
How to Fix CVE-2026-107289
To remediate this vulnerability, upgrade all affected Pydantic AI dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install pydantic-ai>=1.107.6
pip install pydantic-ai>=2.44.0
pip install pydantic-ai-slim>=1.107.6
pip install pydantic-ai-slim>=2.44.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pydantic-ai
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-107289, inspect your installed packages using pip:
pip show pydantic-ai
Analyze the terminal output to locate any version of Pydantic AI in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.107.6), your application is affected.
Note: The pip show pydantic-ai command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1289: Improper Validation of Unsafe Equivalence in Input, where the product receives an input value that is used as a resource identifier or other type of reference, but it does not validate or incorrectly validates that the input is equivalent to a potentially-unsafe value. In Pydantic AI, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-107289 Affected Pydantic AI Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pydantic-ai
|
PyPI |
≥ 1.56.0
< 1.107.6
|
1.107.6
|
|
pydantic-ai
|
PyPI |
≥ 2.0.0b1
< 2.44.0
|
2.44.0
|
|
pydantic-ai-slim
|
PyPI |
≥ 1.56.0
< 1.107.6
|
1.107.6
|
|
pydantic-ai-slim
|
PyPI |
≥ 2.0.0b1
< 2.44.0
|
2.44.0
|
References
Frequently Asked Questions
What is CVE-2026-107289?
Which Pydantic AI versions are affected?
What version fixes CVE-2026-107289?
Is pydantic-ai affected?
Is pydantic-ai-slim affected?
What is the CVSS score of CVE-2026-107289?
What CWE is associated with CVE-2026-107289?
How can I check PyPI dependencies for CVE-2026-107289?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vmxc-h2x2-jmf3",
"modified" : "2026-10-08T16:48:07Z",
"published" : "2026-10-08T16:48:06Z",
"aliases" : [ "CVE-2026-107289" ],
"summary" : "Pydantic AI: SSRF cloud-metadata blocklist bypass via IPv6 zone identifiers",
"details" : "### Summary\n\nWhen 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.\n\nThis is an incomplete fix of [GHSA-cqp8-fcvh-x7r3](https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-cqp8-fcvh-x7r3) / [CVE-2026-46678](https://nvd.nist.gov/vuln/detail/CVE-2026-46678) and [GHSA-cg7w-rg45-pc59](https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-cg7w-rg45-pc59) / [CVE-2026-48782](https://nvd.nist.gov/vuln/detail/CVE-2026-48782), themselves follow-ups to [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 local access allowed. That guarantee did not hold for zone-scoped spellings of the IPv6 metadata endpoints.\n\n\n### Details\n\nThe 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.\n\nOnly 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.\n\n### Who Is Affected\n\nYou are affected **only if** your application opts a URL that is, or could be, influenced by untrusted input into local network access, through either:\n\n- a `FileUrl` (`ImageUrl`, `AudioUrl`, `VideoUrl`, `DocumentUrl`) with `force_download='allow-local'`; or\n- `web_fetch_tool(allow_local_urls=True)`, where the model chooses the URL.\n\nBoth are off by default.\n\nYou 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:\n\n- `Agent.to_web` / `clai web`\n- `VercelAIAdapter`\n- `AGUIAdapter` / `Agent.to_ag_ui`\n\n`web_fetch_tool` is configured by your own application, so a client cannot turn on `allow_local_urls`.\n\nApplications that only download from developer-controlled URLs are not affected.\n\n### Remediation\n\nUpgrade 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.\n\n### Workaround for Unpatched Versions\n\nAvoid 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.\n\n### Credits\n\nReported by [@euriconicacio](https://github.com/euriconicacio).",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pydantic-ai"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.56.0"
}, {
"fixed" : "1.107.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "pydantic-ai"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0b1"
}, {
"fixed" : "2.44.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "pydantic-ai-slim"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.56.0"
}, {
"fixed" : "1.107.6"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "pydantic-ai-slim"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0b1"
}, {
"fixed" : "2.44.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-vmxc-h2x2-jmf3"
}, {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/pull/8401"
}, {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/pull/8402"
}, {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/commit/02157e1b87bd45d3f2e111ce07afdf89f9fb0e5b"
}, {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/commit/4da70591460f51a8c4f128eaeef70a33340dbd55"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pydantic/pydantic-ai"
}, {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/releases/tag/v1.107.6"
}, {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/releases/tag/v2.44.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1289", "CWE-918" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-10-08T16:48:06Z",
"nvd_published_at" : null
}
}