SSRF in Pydantic Pydantic-Ai
CVE-2026-54249
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.
Vulnerability class: SSRF (Server-Side Request Forgery)
EPSS: 0.002 (9.6th percentile) — read the EPSS interpretation.
CVSS v3 metric
CVSS v3 base score 6.8 (Medium). Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N.
Affected products
- Pydantic Pydantic-ai — versions >= 1.65.0, < 1.106.0, >= 2.0.0b1, < 2.0.0b6
- Pydantic Pydantic_ai — versions 2.0.0
- Pydantic Pydantic-ai-slim — versions >= 2.0.0b1, < 2.0.0b6, >= 1.65.0, < 1.106.0
Weakness classification (CWE)
References
- security-advisories@github.com (x_refsource_CONFIRM, Vendor Advisory)
Frequently asked questions
- What is CVE-2026-54249?
- CVE-2026-54249 is a medium-severity vulnerability in Pydantic Pydantic-Ai, classified under Server-Side Request Forgery (SSRF). CVSS score: 6.8/10. Published 2026-07-29.
- How severe is CVE-2026-54249?
- Medium severity. CVSS v3 base score is 6.8 out of 10.