CVE-2026-107289 is a medium-severity (CVSS 6.8) Server-Side Request Forgery (SSRF) vulnerability in pydantic-ai. A fix is available for pydantic-ai — see the affected versions and patch details below.
Pydantic AI: SSRF cloud-metadata blocklist bypass via IPv6 zone identifier (incomplete fix for CVE-2026-46678 and CVE-2026-48782)
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-107289.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2026-107289 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 394,803 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
pydantic-ai🐍pydantic-ai🐍pydantic-ai-slim🐍pydantic-ai-slimReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
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) withforce_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 webVercelAIAdapterAGUIAdapter/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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | pydantic-ai | ≥ 1.56.0&&< 1.107.6 | 1.107.6pip install --upgrade 'pydantic-ai==1.107.6' |
| 🐍PyPI | pydantic-ai | ≥ 2.0.0b1&&< 2.44.0 | 2.44.0pip install --upgrade 'pydantic-ai==2.44.0' |
| 🐍PyPI | pydantic-ai-slim | ≥ 1.56.0&&< 1.107.6 | 1.107.6pip install --upgrade 'pydantic-ai-slim==1.107.6' |
| 🐍PyPI | pydantic-ai-slim | ≥ 2.0.0b1&&< 2.44.0 | 2.44.0pip install --upgrade 'pydantic-ai-slim==2.44.0' |
Affected Products
pydantic aipydanticDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for pydantic-ai, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update pydantic-ai to 1.107.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-107289 is resolved across your whole dependency graph.
Workarounds
Restrict outbound requests from the affected component to an allowlist of hosts, block access to link-local and internal address ranges at the network layer, and require authentication on internal services so a forged request cannot reach them unauthenticated.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
A LOW impact information disclosure flaw was found in the pydantic-ai Python agent framework, which is shipped in Red Hat Enterprise Linux AI and Lightspeed Core products. When an application explicitly opts attacker-influenced URLs into local network access (a FileUrl with force_download='allow-local' or…
Local network access in pydantic-ai is opt-in and disabled by default. Do not enable force_download='allow-local' on FileUrl objects or allow_local_urls=True on web_fetch_tool for URLs that could be influenced by untrusted input; web_fetch_tool is configured only by the application itself, so a client cannot enable local network access on its own. If local network access must be allowed for such URLs, reject URL hosts containing '%' (an IPv6 zone identifier) before constructing the FileUrl or configuring the tool. Upgrading pydantic-ai to a version containing the upstream fix also resolves the issue.Source: Red Hat security advisory for CVE-2026-107289 (CC BY 4.0)
Frequently Asked Questions
Is CVE-2026-107289 in your dependencies?
Find it across PyPI, including transitive dependencies.