VAITP Dataset

← Back to the dataset

CVE-2026-107289

IPv6 zone ID bypasses cloud‑metadata blocklist via forced‑local URL fetch.

  • CVSS 6.8
  • CWE-918
  • Information Leakage
  • Remote

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.

CVSS base score
6.8
Published
2026-10-08
OWASP
A10 Server-Side Request Forgery (SSRF)
Orthogonal defect classification
Checking
Code defect classification
Incorrect Check
Category
Information Leakage
Subcategory
Information Disclosure
Accessibility scope
Remote
Impact
Information Disclosure
Affected component
Pydantic AI
Fixed by upgrading
Yes

Solution

Upgrade Pydantic AI to ≥ 1.107.6 (or ≥ 2.44.0).

Vulnerable code sample

from pydantic_ai import FileUrl, Agent

def fetch_credentials(url: str) -> str:
    # VULNERABLE: allows attacker-controlled local URLs bypassing blocklist
    file = FileUrl(url, force_download='allow-local')
    data = file.read_text()
    return data

def run():
    agent = Agent()
    creds = fetch_credentials("http://[fd00:1234::1%eth0]/metadata")
    agent.store_secret(creds)

Patched code sample

from pydantic_ai import FileUrl, Agent

def fetch_credentials(url: str) -> str:
    # FIX: disallow local URLs to enforce blocklist
    file = FileUrl(url, force_download='deny')
    data = file.read_text()
    return data

def run():
    agent = Agent()
    creds = fetch_credentials("http://[fd00:1234::1]/metadata")
    agent.store_secret(creds)

Published fix

Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.

Cite this entry

@misc{vaitp:cve2026107289,
  title        = {{IPv6 zone ID bypasses cloud‑metadata blocklist via forced‑local URL fetch.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-107289},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-107289/}}
}

Download this entry as JSON Download the whole dataset

Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.

The supreme art of war is to subdue the enemy without fighting.

Sun Tzu – “The Art of War”

:: Shaping the future through research and ingenuity ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.