Description
Pydantic AI is a Python agent framework for building Generative AI applications. In versions 1.65.0 through 1.105.0, and 2.0.0b1 through 2.0.0b5, a client that submits message history to a Pydantic AI UI adapter (such as the Vercel AI adapter) can reference arbitrary files in the application's model-provider or cloud-storage account. While file URL parts are validated against a scheme allowlist, UploadedFile references — which point to a file by provider file ID or cloud-storage URI (e.g. s3://…, gs://…) — were forwarded without validation. Because the provider resolves an UploadedFile using the server-side identity (IAM role, service account, or provider API key) rather than the client's, an attacker can craft message history to make the server read objects from its own account or other tenants, given a referenceable identifier. Exploitation requires a valid file identifier, which is not always unguessable depending on how the application names objects. This issue has been fixed in versions 1.106.0 and 2.0.0b6.
Published: 2026-07-29
Score: 6.8 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Pydantic AI UI adapters, including the Vercel AI adapter, incorrectly trust client‑supplied providerMetadata when constructing UploadedFile objects. An attacker can embed a reference to a provider file identifier or a cloud‑storage URI in the message history. Because the server resolves the UploadedFile using its own IAM credentials rather than the requester’s, the attacker can cause the server to read any file that can be referenced, including objects owned by other tenants. The result is a confidential disclosure of arbitrary files. This is an uncontrolled resource access flaw (CWE‑918).

Affected Systems

The vulnerability exists in Pydantic AI versions 1.65.0 through 1.105.0 and in the beta releases 2.0.0b1 through 2.0.0b5 for both the standard pydantic‑ai and the slim variant. These products are commonly used in generative AI UIs, including the Vercel AI adapter.

Risk and Exploitability

The CVSS score of 6.8 indicates moderate severity, but the EPSS score of less than 1 % signals a very low current exploitation probability. It is not listed in CISA’s KEV catalog, so no widespread known attacks have been reported. Exploitation can be carried out remotely by an attacker who submits a crafted message containing a valid provider file identifier; discovery of such identifiers may depend on how the application names objects. Server‑side identity is used to resolve the file, so the attacker does not need privileged credentials beyond the ability to reference existing objects.

Generated by OpenCVE AI on August 4, 2026 at 12:24 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Pydantic AI to 1.106.0 or later, or to 2.0.0b6 or later, where the issue is fixed.
  • If upgrading is not immediately possible, enforce strict validation of UploadedFile identifiers on the server side and disallow client‑controlled providerMetadata processing entirely.
  • Apply network segmentation to isolate the service’s IAM roles and cloud‑storage credentials from direct exposure to public adapters.
  • Audit configuration and code to ensure that cloud‑storage access is performed exclusively with server‑managed identities, not with client‑supplied identifiers.

Generated by OpenCVE AI on August 4, 2026 at 12:24 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-h7p7-w5gc-xj3w Pydantic AI: Unvalidated UploadedFile references in UI adapters allow server-side file access using the application's credentials
History

Fri, 31 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Moderate


Thu, 30 Jul 2026 22:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 29 Jul 2026 21:45:00 +0000

Type Values Removed Values Added
First Time appeared Pydantic
Pydantic pydantic-ai
Vendors & Products Pydantic
Pydantic pydantic-ai

Wed, 29 Jul 2026 20:45:00 +0000

Type Values Removed Values Added
Description Pydantic AI is a Python agent framework for building Generative AI applications. In versions 1.65.0 through 1.105.0, and 2.0.0b1 through 2.0.0b5, a client that submits message history to a Pydantic AI UI adapter (such as the Vercel AI adapter) can reference arbitrary files in the application's model-provider or cloud-storage account. While file URL parts are validated against a scheme allowlist, UploadedFile references — which point to a file by provider file ID or cloud-storage URI (e.g. s3://…, gs://…) — were forwarded without validation. Because the provider resolves an UploadedFile using the server-side identity (IAM role, service account, or provider API key) rather than the client's, an attacker can craft message history to make the server read objects from its own account or other tenants, given a referenceable identifier. Exploitation requires a valid file identifier, which is not always unguessable depending on how the application names objects. This issue has been fixed in versions 1.106.0 and 2.0.0b6.
Title VercelAIAdapter trusts client-controlled `providerMetadata` to construct `UploadedFile` — S3/GCS confused deputy via provider metadata injection
Weaknesses CWE-918
References
Metrics cvssV3_1

{'score': 6.8, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N'}


Subscriptions

Pydantic Pydantic-ai Pydantic Ai
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-30T13:08:12.954Z

Reserved: 2026-06-12T16:25:43.085Z

Link: CVE-2026-54249

cve-icon Vulnrichment

Updated: 2026-07-30T13:08:08.990Z

cve-icon NVD

Status : Analyzed

Published: 2026-07-29T21:17:47.323

Modified: 2026-08-04T13:22:03.630

Link: CVE-2026-54249

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-07-29T20:28:07Z

Links: CVE-2026-54249 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-04T12:30:09Z

Weaknesses
  • CWE-918

    Server-Side Request Forgery (SSRF)