UTC
Medium

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
What it is

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.

What to do

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 you cannot upgrade yet

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.

Affected
PackageRegistryAffectedFixed in
pydantic-aiPyPI>= 1.65.0, < 1.106.01.106.0
pydantic-aiPyPI>= 2.0.0b1, < 2.0.0b62.0.0b6
pydantic-ai-slimPyPI>= 1.65.0, < 1.106.01.106.0
pydantic-ai-slimPyPI>= 2.0.0b1, < 2.0.0b62.0.0b6

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.

Sources: GitHub Advisory Database, reviewed and malware advisories (CC BY 4.0, https://github.com/advisories); advisories published by Cursor (https://github.com/cursor/cursor/security/advisories); advisories published by OpenClaw (https://github.com/openclaw/openclaw/security/advisories); advisories published by vLLM (https://github.com/vllm-project/vllm/security/advisories); advisories published by Open WebUI (https://github.com/open-webui/open-webui/security/advisories); advisories published by n8n (https://github.com/n8n-io/n8n/security/advisories); advisories published by Flowise (https://github.com/FlowiseAI/Flowise/security/advisories); advisories published by Langflow (https://github.com/langflow-ai/langflow/security/advisories); advisories published by the MCP Python SDK project (https://github.com/modelcontextprotocol/python-sdk/security/advisories); advisories published by MLflow (https://github.com/mlflow/mlflow/security/advisories); CISA Known Exploited Vulnerabilities catalog (CC0). Data as of 2026-11-22. ShieldMap describes how each problem works and how to fix it; it does not publish exploit code. Report a correction to [email protected].