Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐍
🐍 PyPI
Not in CISA KEV
MEDIUM severity

Pydantic AI: SSRF cloud-metadata blocklist bypass via IPv6 zone identifiersGHSA-vmxc-h2x2-jmf3

MEDIUMFix: pydantic/pydantic-ai#8401

GHSA-vmxc-h2x2-jmf3 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.

Also known asCVE-2026-107289PYSEC-2026-4282PYSEC-2026-4291
Published
Updated
Affected
4 pkgs
Patched
4 / 4
Exploits
None indexed
Exploitation data as of Oct 23, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

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 GHSA-vmxc-h2x2-jmf3.

EPSS Exploitation Probability

via FIRST.org ↗
0.3%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs24th percentile — riskier than 24% of all scored CVEsHighest risk

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

GHSA-vmxc-h2x2-jmf3 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

4 pkgs affected
🐍pydantic-ai🐍pydantic-ai🐍pydantic-ai-slim🐍pydantic-ai-slim

Real-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) 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.

Affected Packages

4 total 4 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIpydantic-ai≥ 1.56.0&&< 1.107.61.107.6pip install --upgrade 'pydantic-ai==1.107.6'
🐍PyPIpydantic-ai≥ 2.0.0b1&&< 2.44.02.44.0pip install --upgrade 'pydantic-ai==2.44.0'
🐍PyPIpydantic-ai-slim≥ 1.56.0&&< 1.107.61.107.6pip install --upgrade 'pydantic-ai-slim==1.107.6'
🐍PyPIpydantic-ai-slim≥ 2.0.0b1&&< 2.44.02.44.0pip install --upgrade 'pydantic-ai-slim==2.44.0'

Affected Products

1 product · 2 configurations
Application
pydantic aipydantic
≥ 2.0.0 && < 2.44.0
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    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.

  2. Fix

    Update pydantic-ai to 1.107.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-vmxc-h2x2-jmf3 is resolved across your whole dependency graph.

  3. 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.

Red HatLow

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…

Workaround published by Red Hat
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 GHSA-vmxc-h2x2-jmf3 (CC BY 4.0)

Frequently Asked Questions

### 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](https://github.com/pydantic/pydantic-a
O3 Security · Impact-Aware SCA

Is GHSA-vmxc-h2x2-jmf3 in your dependencies?

Find it across PyPI, including transitive dependencies.

Pydantic AI: SSRF cloud-metadata blocklist bypass via…