CVE-2026-54249
VercelAIAdapter trusts client-controlled `providerMetadata` to construct `UploadedFile` — S3/GCS confused deputy via provider metadata injection
Also known as GHSA-h7p7-w5gc-xj3w, PYSEC-2026-3692, PYSEC-2026-3693
Mitigation
- Upgrade pydantic-ai-slim to one of 1.106.0, 2.0.0b6 (or later in the same release line).
- Upgrade pydantic-ai to one of 1.106.0, 2.0.0b6 (or later in the same release line).
Who should check
- Projects that depend on PyPI package pydantic-ai-slim (>= 1.65.0, < 1.106.0)
- Projects that depend on PyPI package pydantic-ai (>= 1.65.0, < 1.106.0)
- Anyone running pydantic-ai >= 1.65.0, < 1.106.0; >= 2.0.0b1, < 2.0.0b6
- Anyone running pydantic-ai-slim >= 2.0.0b1, < 2.0.0b6; >= 1.65.0, < 1.106.0
Vulnerability facts
- Affected
- pydantic-ai-slim >= 1.65.0, < 1.106.0; pydantic-ai >= 1.65.0, < 1.106.0
- Fixed in
- 1.106.0, 2.0.0b6
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 6.8 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: High
- Privileges required: None
- User interaction: None
- Scope: Changed (impact reaches other components)
- Confidentiality impact: High
- Integrity impact: None
- Availability impact: None
- EPSS
- 0.32% chance of exploitation in 30 days (percentile 17, 2026-11-26)
- CWE
- CWE-918
- Modified
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| PyPI pydantic-ai-slim | >= 1.65.0, < 1.106.0 | 1.106.0, 2.0.0b6 | osv |
| PyPI pydantic-ai | >= 1.65.0, < 1.106.0 | 1.106.0, 2.0.0b6 | osv |
| pydantic-ai | >= 1.65.0, < 1.106.0; >= 2.0.0b1, < 2.0.0b6 | — | cvelist |
| pydantic-ai-slim | >= 2.0.0b1, < 2.0.0b6; >= 1.65.0, < 1.106.0 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-54249. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-54249.md Affected: pydantic-ai-slim >= 1.65.0, < 1.106.0; pydantic-ai >= 1.65.0, < 1.106.0 Fixed in: 1.106.0, 2.0.0b6 Steps: 1. Search this machine and project for pydantic-ai-slim (PyPI), pydantic-ai (PyPI), pydantic-ai, pydantic-ai-slim: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2026-54249 being exploited?
There is no confirmed exploitation: CVE-2026-54249 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.32% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-54249?
Medium: CVSS 6.8 (v3.1, scored by CNA). Remote, no login needed. The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2026-54249?
pydantic-ai-slim >= 1.65.0, < 1.106.0; pydantic-ai >= 1.65.0, < 1.106.0.
Is there a fix for CVE-2026-54249?
Yes. Fixed in 1.106.0, 2.0.0b6. Upgrade pydantic-ai-slim to one of 1.106.0, 2.0.0b6 (or later in the same release line). Upgrade pydantic-ai to one of 1.106.0, 2.0.0b6 (or later in the same release line).
How do I check if I'm affected by CVE-2026-54249?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.