Skip to main content

Pydantic AI CVE-2026-46678

| EUVDEUVD-2026-50561 MEDIUM
Server-Side Request Forgery (SSRF) (CWE-918)
2026-05-21 https://github.com/pydantic/pydantic-ai GHSA-cqp8-fcvh-x7r3 PYSEC-2026-2978 PYSEC-2026-2982
5.9
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Identify app with force_download='allow-local' enabled
  2. Delivery
    Craft IPv6-encoded metadata endpoint URL
  3. Exploit
    Inject URL via untrusted input pathway
  4. Install
    Server evaluates IPv6 address against IPv4-only blocklist
  5. C2
    Blocklist check passes, SSRF request issued
  6. Execute
    Cloud metadata endpoint returns IAM credentials
  7. Impact
    Attacker retrieves credentials from response

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V4 - API and Web Service URL allowlisting, SSRF prevention
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Credential Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires three concurrent conditions: the application must have explicitly set force_download='allow-local' on a FileUrl, ImageUrl, AudioUrl, VideoUrl, or DocumentUrl type; that URL value must be reachable or influenceable by untrusted attacker input; and the server must operate on a dual-stack or IPv6-translated network where IPv6 transition addresses are routed to the underlying IPv4 metadata endpoint. Exploitation is blocked against the bundled high-level integrations (Agent.to_web / clai web, VercelAIAdapter, AGUIAdapter / Agent.to_ag_ui) because these do not propagate force_download from external data. Applications that only download from developer-controlled URLs are not affected regardless of network configuration. The CVSS PR:N rating confirms no authentication to the target application is required once the above opt-in condition is met, but the opt-in itself is the binding constraint that limits the exploitable population to a subset of deployments.

Impact

CVSS 3.1 vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N yields 6.8 (High). The high attack complexity (AC:H) directly encodes the non-default precondition: the application must explicitly set force_download='allow-local' on a URL pathway reachable by attacker-controlled input, which is not a default configuration and was deliberately chosen by a developer. Changed scope (S:C) and high confidentiality impact (C:H) reflect that a successful exploit exits the application boundary to access cloud IAM credentials with potential lateral movement consequences. No EPSS score was provided in the input data, so probabilistic exploitation likelihood cannot be quantified; absent that signal, AC:H and the narrow opt-in condition together suggest lower real-world priority than the parent CVE-2026-25580 (AC:L). No CISA KEV listing and no confirmed public exploit code have been identified at time of analysis, consistent with a targeted rather than opportunistic threat profile. Defenders should focus triage on identifying deployments that combine allow-local with user-influenced URL inputs - those are the only genuinely at-risk instances, and the blast radius is high if IAM credentials are obtained.

Exploit ScenarioDerived

An attacker who can influence a URL processed by a Pydantic AI application configured with force_download='allow-local' submits an IPv6-encoded cloud metadata address - for example, http://[::ffff:169.254.169.254]/latest/meta-data/iam/security-credentials/ targeting AWS IMDSv1 - which passes the unpatched blocklist because it is evaluated as an IPv6 address rather than a blocked IPv4 address. On a dual-stack or NAT64-enabled host, the network stack routes the request to the underlying metadata endpoint, which returns short-term IAM credentials that the attacker retrieves from the server's response. No public exploit code has been identified at time of analysis, though the IPv6 transition bypass technique is well-documented in SSRF research literature.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 21, 2026

IPv6 transition-form SSRF in Pydantic AI bypasses the cloud-metadata blocklist introduced as a fix for CVE-2026-25580, exposing cloud IAM short-term credentials on dual-stack and translated networks. The bypass affects pydantic-ai and pydantic-ai-slim deployments that explicitly opt FileUrl-family types into force_download='allow-local' on URLs reachable by untrusted input - a materially narrower attack surface than its parent CVE, reflected in the AC:H rating versus the parent's AC:L. CVSS 6.8 (High) with Changed scope captures that a successful attack escapes the application boundary to reach cloud metadata services; no public exploit code and no CISA KEV listing have been identified at time of analysis.

RemediationAI

Upgrade pydantic-ai or pydantic-ai-slim to version 1.99.0 or later, as confirmed by vendor advisory GHSA-cqp8-fcvh-x7r3 (https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-cqp8-fcvh-x7r3); this release extends the blocklist to IPv6 transition forms and additional IANA special-purpose ranges. If immediate upgrade is not feasible, the vendor-documented workaround is to avoid passing force_download='allow-local' on any URL that could be influenced by untrusted input - this eliminates the attack surface entirely at the cost of losing local-download functionality for those URL types. If allow-local is operationally required and patching is delayed, developers must resolve hostnames independently, validate the resolved address against a metadata blocklist that explicitly covers IPv6 transition encodings (IPv4-mapped, 6to4, NAT64 well-known prefix), and only then construct the FileUrl object; this approach is operationally complex and error-prone and should be treated as a temporary bridge only. The bundled integrations (Agent.to_web, VercelAIAdapter, AGUIAdapter) require no remediation action as they do not propagate force_download from external data.

Affected VersionsENISA

pydantic-ai 1.56.0, < 1.99.0
pydantic-ai-slim 1.56.0, < 1.99.0

Affected Packages

pypi pydantic-ai fix: 1.99.0
pypi pydantic-ai-slim fix: 1.99.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability (CWE-918, Server-Side Request Forgery) resides in the URL download handling logic of the pydantic-ai and pydantic-ai-slim Python packages (PyPI identifiers pkg:pip/pydantic-ai and pkg:pip/pydantic-ai-slim). The parent fix for CVE-2026-25580 blocked private and cloud-metadata IPv4 addresses but did not normalize IPv6 transition representations before blocklist evaluation: IPv4-mapped IPv6 (e.g., ::ffff:169.254.169.254), 6to4 addresses (e.g., 2002:a9fe:a9fe::/48 range), and NAT64 well-known prefix forms all route to the same underlying IPv4 endpoint on dual-stack and translated network stacks, circumventing a purely IPv4-aware blocklist. The force_download='allow-local' mode is an explicit developer opt-in permitting downloads from private IP space; the bug is that the cloud-metadata bypass protection within this mode was not extended to IPv6-encoded equivalents of blocked IPv4 addresses. The 1.99.0 fix normalizes all IPv6 transition forms before blocklist evaluation and extends coverage to additional IANA special-purpose ranges.

Know when the next one hits your stack

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 5.9 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
Red Hat 6.8 MEDIUM

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Lifecycle Timeline

1
CVSS changed
Aug 04, 2026 - 14:23 NVD
6.8 (MEDIUM) 5.9 (MEDIUM)

DescriptionNVD

Summary

When an application using Pydantic AI opts a URL into force_download='allow-local' (which disables the default block on private/internal IPs), the cloud-metadata blocklist could be bypassed by encoding the metadata IP in an IPv6 transition form (IPv4-mapped IPv6, 6to4, or NAT64). Dual-stack and translated networks route the IPv6 wrapper to the underlying IPv4 endpoint, exposing cloud IAM short-term credentials.

This is an incomplete fix of GHSA-2jrp-274c-jhv3 / CVE-2026-25580. The parent advisory's remediation guaranteed that "cloud metadata endpoints are always blocked, even with allow-local." That guarantee did not hold for IPv6-encoded forms of the metadata IPs.

Severity

Same impact metrics as the parent CVE, but materially narrower attack surface (AC:H instead of AC:L), because exploitation requires the application to have opted into allow-local on a URL influenced by untrusted input.

Who Is Affected

Applications are affected only if they explicitly opt for FileUrl (ImageUrl, AudioUrl, VideoUrl, DocumentUrl) into force_download='allow-local' on a URL that is, or could be, influenced by untrusted input.

Applications are not affected if they 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

Applications that only download from developer-controlled URLs are not affected.

Remediation

Upgrade to 1.99.0 or later. The cloud-metadata and private-IP blocklists now apply to IPv6 transition forms that route to a blocked IPv4 endpoint (IPv4-mapped IPv6, 6to4, and NAT64 well-known prefix). The blocklists have also been extended to cover additional IANA-reserved IPv4 and IPv6 special-purpose ranges.

Workaround for Unpatched Versions

Avoid passing force_download='allow-local' on any URL that could be influenced by untrusted input. If developers must, resolve the hostname themselves and validate the result against their own metadata blocklist - including IPv6-encoded forms - before constructing the FileUrl.

Credits

Reported by [j0hndo](mailto:dohyun4466@gmail.com).

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 2 pypi packages depend on pydantic-ai (2 direct, 0 indirect)
  • 12 pypi packages depend on pydantic-ai-slim (10 direct, 2 indirect)

Ecosystem-wide dependent count for version 1.56.0 and other introduced versions.

Threat Intelligence Overview

EPSS Score
0.0%
Top 88% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact· derived
Medium

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Server-Side Request Forgery exploits applications that fetch remote resources based on user-supplied URLs.

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy