CVE-2026-54249: VercelAIAdapter trusts client-controlled `providerMetadata` to construct `UploadedFile` — S3/GCS confused deputy via provider metadata injection
Summary
A client that can submit message history to a Pydantic AI UI adapter can reference arbitrary files in the application's model-provider or cloud-storage account. The server forwards the reference to the model provider, which fetches it using the server's own credentials, allowing the client to read files it should not have access to.
Details
UI adapters reconstruct file parts from client-submitted message history and forward them to the model provider. File URL parts are validated against a scheme allowlist before being forwarded, but 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, a client that crafts message history containing an attacker-chosen UploadedFile can cause the server to read objects belonging to its own account or to other tenants, given a referenceable identifier.
Impact
Applications that pass untrusted client-submitted message history to an agent through a UI adapter (such as the Vercel AI adapter). Exploitation requires the attacker to reference a valid file identifier; depending on how the application names objects, such identifiers are not always unguessable.
Patches
Upgrade to 1.106.0 (1.x) or 2.0.0b6 (the 2.x beta line), which validate UploadedFile references on client-submitted messages the same way file URLs are validated.
Workarounds
If users cannot upgrade, do not pass untrusted client-submitted message history to the agent, or strip UploadedFile parts from incoming messages before running the agent.
Other sources
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.
— MITRE
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/pydantic-aito a version that resolves this vulnerability.Fixed in 2.0.0b6 - Upgrade
Upgrade
pip/pydantic-aito a version that resolves this vulnerability.Fixed in 1.106.0 - Upgrade
Upgrade
pip/pydantic-ai-slimto a version that resolves this vulnerability.Fixed in 2.0.0b6 - Upgrade
Upgrade
pip/pydantic-ai-slimto a version that resolves this vulnerability.Fixed in 1.106.0 - Upgrade
Upgrade
Pydantic AIto a version that resolves this vulnerability.Fixed in 1.106.0 - Upgrade
Upgrade
Pydantic AIto a version that resolves this vulnerability.Fixed in 2.0.0b6 - Configuration
If you cannot upgrade, do not pass untrusted client-submitted message history to the agent via the UI adapter; alternatively strip UploadedFile parts from incoming messages before running the agent.
Pydantic AI UI adapter (e.g., Vercel AI adapter) UploadedFile handling for client-submitted message history = strip
Event History
Frequently Asked Questions
What is the severity of CVE-2026-54249?
The severity of CVE-2026-54249 is medium with a score of 6.8.
How do I fix CVE-2026-54249?
To fix CVE-2026-54249, update the Pydantic AI framework to a version that is not vulnerable.
What does CVE-2026-54249 mean?
CVE-2026-54249 refers to a vulnerability in the Pydantic AI framework where client-controlled `providerMetadata` can lead to inappropriate file access.
What applications are affected by CVE-2026-54249?
The versions of Pydantic AI from 1.65.0 through 1.105.0 and 2.0.0b1 through 2.0.0b5 are affected by CVE-2026-54249.
What type of vulnerability is CVE-2026-54249 classified as?
CVE-2026-54249 is classified as a Server-Side Request Forgery (SSRF) vulnerability.