Pydantic AI: Unvalidated UploadedFile references in UI adapters allow server-side file access using the application's credentials
CVE-2026-54249 · GHSA-h7p7-w5gc-xj3w · published 2026-08-13 · updated 2026-10-22
- Severity
- Medium
- CVSS score
- 6.8
- Chance of exploitation (EPSS)
- 0.32%
- Fixed in
- 2.0.0b6
- Exploitation No known exploitation
- Automatable No
- Technical impact Partial
- CISA SSVC
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.
Upgrade pydantic-ai to 2.0.0b6 or later, and pydantic-ai-slim to 2.0.0b6 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.
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.
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.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| pydantic-ai | PyPI | >= 1.65.0, < 1.106.0 | 1.106.0 |
| pydantic-ai | PyPI | >= 2.0.0b1, < 2.0.0b6 | 2.0.0b6 |
| pydantic-ai-slim | PyPI | >= 1.65.0, < 1.106.0 | 1.106.0 |
| pydantic-ai-slim | PyPI | >= 2.0.0b1, < 2.0.0b6 | 2.0.0b6 |
- CriticalMLflow: Unauthenticated full-read SSRF in webhook delivery: _validate_webhook_url bypassed via unvalidated HTTP redirects (and DNS rebindingmlflowExploited
- Critical@zereight/mcp-gitlab Vulnerable to Server-Side Request Forgery@zereight/mcp-gitlab
- CriticalSSRF + LLM API key exfiltration via user-controlled basepath / baseUrl in 8 chat-model nodesflowise, flowise-components
- CriticalLocalAI POST /models/apply permits unauthenticated server-side request forgery through gallery URLsgithub.com/mudler/LocalAI
- CriticalFastMCP OpenAPI Provider has an SSRF & Path Traversal Vulnerabilityfastmcp
- CriticalBentoML SSRF Vulnerability in File Upload Processingbentoml
- HighPydantic AI: Concurrency-limited models can keep their slot when a streamed request ends earlypydantic-ai, pydantic-ai-slim
- HighPydantic AI Web chat UI (`Agent.to_web()`, `clai web`): a website visited by the developer can trigger agent runs and server-side tool execupydantic-ai, pydantic-ai, pydantic-ai-slim, pydantic-ai-slim
- HighPydantic AI has Server-Side Request Forgery (SSRF) in URL Download Handlingpydantic-ai, pydantic-ai-slim
- HighPydantic AI has Stored XSS via Path Traversal in Web UI CDN URLpydantic-ai, pydantic-ai-slim
- MediumPydantic AI: Event loop blocked by quadratic title extraction in `web_fetch`pydantic-ai, pydantic-ai, pydantic-ai-slim, pydantic-ai-slim
- MediumPydantic AI Web chat UI (`Agent.to_web()`, `clai web`): the local chat endpoint does not validate the `Host` headerpydantic-ai, pydantic-ai, pydantic-ai-slim, pydantic-ai-slim
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.