Skip to content
Heist/ feed
Back to feed
Medium

VercelAIAdapter trusts client-controlled `providerMetadata` to construct `UploadedFile` — S3/GCS confused deputy via provider metadata injection

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2026-54249
Confirmed fixed CVEs
Not specified
Updated in this feed
6 Nov 2026, 03:58 UTC · Revision 1

Source evidence

VercelAIAdapter trusts client-controlled `providerMetadata` to construct `UploadedFile` — S3/GCS confused deputy via provider metadata injection

core-osv · Original source

Published 29 Jul 2026, 20:28 UTC

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.

osv:CVE-2026-54249
Complete source record
{
  "id": "8cba98a2e1823209424473ed7da274a25f6e853e1bdcca90628c348b691f7ad7",
  "url": "https://osv.dev/vulnerability/CVE-2026-54249",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "VercelAIAdapter trusts client-controlled `providerMetadata` to construct `UploadedFile` — S3/GCS confused deputy via provider metadata injection",
    "summary": "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.",
    "evidence": "osv:CVE-2026-54249",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2026-54249",
      "aliases": [
        "CVE-2026-54249",
        "GHSA-h7p7-w5gc-xj3w",
        "PYSEC-2026-3692",
        "PYSEC-2026-3693"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/pydantic/pydantic-ai",
              "type": "GIT",
              "events": [
                {
                  "introduced": "9af531667fc2b5f87b8f61145f8b14f97217a62a"
                },
                {
                  "fixed": "2a6a1a6658afde4c154f1651a66763b248ff2b27"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:pydantic:pydantic_ai:*:*:*:*:*:python:*:*",
                    "range": [
                      {
                        "introduced": "1.65.0"
                      },
                      {
                        "fixed": "1.105.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.104.0",
            "v1.103.0",
            "v1.102.0",
            "v1.91.0",
            "v1.101.0",
            "v1.100.0",
            "v1.99.0",
            "v1.98.0",
            "v1.97.0",
            "v1.96.0",
            "v1.96.1",
            "v1.94.0",
            "v1.95.1",
            "v1.95.0",
            "v1.93.0",
            "v1.92.0",
            "v1.90.0",
            "v1.89.1",
            "v1.89.0",
            "v1.88.0",
            "v1.87.0",
            "v1.86.0",
            "v1.86.1",
            "v1.85.1",
            "v1.85.0",
            "v1.84.1",
            "v1.84.0",
            "v1.83.0",
            "v1.82.0",
            "v1.81.0",
            "v1.80.0",
            "v1.79.0",
            "v1.78.0",
            "v1.77.0",
            "v1.74.0",
            "v1.76.0",
            "v1.75.0",
            "v1.73.0",
            "v1.72.0",
            "v1.70.0",
            "v1.69.0",
            "v1.68.0",
            "v1.67.0",
            "v1.66.0",
            "v1.65.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-54249.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:46.433325504Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54249.json",
        "https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-h7p7-w5gc-xj3w",
        "https://nvd.nist.gov/vuln/detail/CVE-2026-54249"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-918"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54249.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2026-54249",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 514551,
  "published_at": "2026-07-29T20:28:07.154+00:00"
}