CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-54249

CVE-2026-54249: Server-Side Request Forgery via Confused Deputy in Pydantic AI UI Adapters

Alon Barad
Alon Barad
Software Engineer

Aug 13, 2026·7 min read·16 visits

Executive Summary (TL;DR)

A Confused Deputy SSRF vulnerability in Pydantic AI UI adapters allows remote, unauthenticated attackers to retrieve and exfiltrate private cloud storage files by injecting manipulated metadata structures into client-submitted message histories.

A Server-Side Request Forgery (SSRF) / Confused Deputy vulnerability has been identified in Pydantic AI UI Adapters (such as VercelAIAdapter). Under certain conditions, a malicious client can supply manipulated message history with provider metadata that forces the server to resolve files within privileged cloud environments (AWS S3, Google Cloud Storage) or model providers. This occurs because the adapters deserialize client-provided metadata structures directly into UploadedFile instances without validation, which are subsequently fetched using high-privilege server credentials.

Vulnerability Overview

Pydantic AI is a pythonic agent framework built on Pydantic to simplify Generative AI application development. Among its features, it provides UI adapters like VercelAIAdapter and AGUIAdapter to ease integrations with frontend protocol standards (e.g., the Vercel AI SDK). These adapters act as intermediaries, translating standard external client JSON payloads containing chat histories into internal message models like ModelRequest and ModelResponse structures.

When processing message history, frontend protocols often allow users to include file attachments. The server-side UI adapters must deserialize these attachment records into a structured format before passing them to the language model provider. Inside the vulnerable versions, the library parsed metadata elements (such as providerMetadata fields) to reconstruct representation structures of uploaded assets. Specifically, it mapped files to instances of the UploadedFile class.

This architecture exposes an attack surface because the deserializer failed to distinguish between client-uploaded files and server-side assets. While standard FileUrl strings were checked against an explicit allowlist of valid URL schemes (defaulting to HTTP and HTTPS), parameters matching UploadedFile bypassed this filter entirely. Consequently, a client-supplied identifier could represent file systems, private storage buckets, or internal vendor resources, leading directly to a Server-Side Request Forgery (SSRF) condition.

Root Cause Analysis

The root cause of this vulnerability lies in the improper trust boundary validation within the UI adapters' message-parsing logic. Specifically, the adapters trusted the structure of the JSON-serialized metadata sent directly by the untrusted web client. If a client sent a message payload containing a providerMetadata object under the pydantic_ai namespace, the deserialization logic implicitly trusted this input to populate the parameters of an UploadedFile instance.

An UploadedFile structure can point directly to external, restricted assets using a model-provider file ID or a raw cloud storage URI, such as s3:// or gs://. Because the library lacked a verification routine for client-submitted file metadata, these references were passed unchanged downstream. When the Pydantic AI agent initiated a request to the model provider (e.g., AWS Bedrock or OpenAI), it supplied the structured UploadedFile references to be processed by the LLM.

At this juncture, the system operates as a classic Confused Deputy. The model provider, acting on behalf of the server-side application, resolves the cloud-storage URI or file ID using the server's high-privilege context, such as AWS IAM instance profiles, service account credentials, or provider API keys. The server does not validate whether the active client session has the authorization to access that specific asset. If the storage asset exists and the server credentials have read access, the file contents are fetched, ingested into the LLM context, and ultimately leaked back to the client.

Code Analysis & Patch Walkthrough

The fix for this vulnerability was introduced in pull request #5772. The core remediation strategy forces the UI adapters to strip and ignore any client-submitted UploadedFile references by default, unless the system is explicitly configured with a new security parameter: preserve_file_data = True.

In pydantic_ai_slim/pydantic_ai/ui/_adapter.py, the base UIAdapter class was updated to declare and default this property:

# Base UIAdapter updates
preserve_file_data: bool = False
"""Whether to keep UploadedFile items from client-submitted messages.
 
Defaults to False. By default, UploadedFile items in client-submitted messages are
dropped with a warning before the messages are passed to the agent...
"""

The message sanitization routine (sanitize_messages) was updated to track dropped uploaded file providers and raise a warning to alert administrators of potential exploitation or misconfigurations. The inner sanitization of user content demonstrates how the validation logic was altered:

def _filter_user_content(
    self,
    content: Sequence[UserContent],
    disallowed_schemes: set[str],
    reset_force_download_values: set[ForceDownloadMode],
    dropped_uploaded_file_providers: set[str],
) -> list[UserContent]:
    filtered: list[UserContent] = []
    for item in content:
        if isinstance(item, FileUrl):
            # Checks URL schemes
            scheme = urlparse(item.url).scheme.lower()
            if scheme not in self.allowed_file_url_schemes:
                disallowed_schemes.add(scheme)
                continue
            item = self._sanitize_file_url(item, reset_force_download_values)
        # FIX: Check if UploadedFile structure is supplied
        elif isinstance(item, UploadedFile) and not self.preserve_file_data:
            # Record the dropped file provider and omit from the payload
            dropped_uploaded_file_providers.add(item.provider_name)
            continue
        filtered.append(item)
    return filtered

Additionally, identical logic was added inside _sanitize_tool_return_content to prevent nested file structures within tool returns from bypassing the security filter. If preserve_file_data is configured to True, the library delegates trust entirely to the frontend configuration, indicating that the developer has separately implemented authorization mechanisms or operates within a trusted, authenticated perimeter.

Exploitation Methodology

Exploitation of CVE-2026-54249 does not require authentication to the backend model provider, but requires access to the public endpoint exposing the UI adapter. The attack relies on guessing or obtaining a valid cloud storage identifier or provider file ID that the backend's identity is authorized to read.

An attacker begins by sending an HTTP POST request representing a user message to the endpoint mapped to the UI adapter. The message content urges the LLM to read and output the details of a file. In the payload, the attacker defines a parts array where they inject a standard URL, but override the providerMetadata dictionary with target parameters:

{
  "role": "user",
  "content": "Verify and summarize this file for me.",
  "parts": [
    {
      "type": "file",
      "mediaType": "application/pdf",
      "url": "https://legitimate.example.com/placeholder.pdf",
      "providerMetadata": {
        "pydantic_ai": {
          "file_id": "s3://internal-company-confidential/salaries-2026.pdf",
          "provider_name": "bedrock"
        }
      }
    }
  ]
}

Upon receiving the request, the server translates the payload. Because the client has structured the providerMetadata to mimic a legitimate file upload, the adapter translates this into a model-request container with an UploadedFile object targeting the restricted S3 URI. The backend agent executes the model request; Bedrock accesses the cloud object using the server's IAM credentials, processes the PDF, and the model streams the summary containing sensitive data back to the attacker.

Scope and Impact Assessment

The security impact of CVE-2026-54249 is classified as a High-severity confidentiality compromise, receiving a CVSS v3.1 base score of 6.8. The attack complexity is rated as High because the attacker must successfully identify or guess valid target cloud-storage URIs or file IDs to execute the payload. The vulnerability requires no client interaction and can be executed over the network by an unauthenticated attacker, yielding full read access to any storage resource accessible by the server's execution context.

The scope is changed (S:C) because the exploit enables an attacker to cross security boundaries—moving from the public application interface into internal storage structures (e.g., private Amazon S3 buckets or Google Cloud Storage) that are isolated from the web. The integrity and availability of the system remain unaffected, as the vulnerability does not provide direct file write or deletion permissions.

Mitigation & Remediation

To fully address this vulnerability, security teams must apply immediate remediation controls across application code, infrastructure privileges, and runtime configurations.

Upgrading the Pydantic AI library is the primary fix. All systems using pydantic-ai or pydantic-ai-slim must be updated to version 1.106.0 or 2.0.0b6 or higher. These patched versions automatically sanitize client-provided data and exclude unsafe UploadedFile objects by default.

If upgrading is delayed, developers must ensure that UI adapters are configured in a highly restrictive environment. Avoid setting preserve_file_data = True unless the frontend has implemented rigorous file ID and user authorization mapping. Furthermore, execute the Principle of Least Privilege for all server roles. Restrict AWS IAM and Google Cloud service account roles associated with the application servers, ensuring they only have read privileges to bucket directories strictly required for public uploads, and explicitly denying access to sensitive or administrative Buckets.

Fix Analysis (1)

Technical Appendix

CVSS Score
6.8/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:N/A:N
EPSS Probability
0.20%
Top 90% most exploited

Affected Systems

Pydantic AI UI Adapters (VercelAIAdapter, AGUIAdapter)

Affected Versions Detail

Product
Affected Versions
Fixed Version
pydantic-ai
Pydantic
>= 1.65.0, < 1.106.01.106.0
pydantic-ai-slim
Pydantic
>= 1.65.0, < 1.106.01.106.0
pydantic-ai
Pydantic
>= 2.0.0b1, < 2.0.0b62.0.0b6
AttributeDetail
CWE IDCWE-918
Attack VectorNetwork
CVSS v3.1 Score6.8
EPSS Score0.00197
ImpactPartial Confidentiality Loss (High)
Exploit Statusnone
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1005Data from Local System
Collection
CWE-918
Server-Side Request Forgery (SSRF)

The web application receives a URL or file identifier from an upstream request and processes it using server privileges without sufficient validation.

References & Sources

  • [1]GitHub Security Advisory GHSA-h7p7-w5gc-xj3w
  • [2]NVD - CVE-2026-54249
  • [3]CVE.org - CVE-2026-54249
  • [4]Pydantic AI Release v1.106.0
  • [5]Pydantic AI Release v2.0.0b6

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•1 day ago•CVE-2026-11748
6.9

CVE-2026-11748: Unauthenticated LDAP Injection in Central Dogma Server Authentication

An LDAP injection vulnerability exists in the centraldogma-server-auth-shiro module of LY Corporation Central Dogma before version 0.84.0. The search logic dynamically constructs LDAP search filters by interpolating user-provided usernames without escaping RFC 4515 metacharacters. Unauthenticated remote attackers can leverage this flaw to bypass authentication, enumerate directory hierarchies, and access unauthorized resources.

Alon Barad
Alon Barad
9 views•6 min read
•1 day ago•CVE-2026-11746
9.4

CVE-2026-11746: Use of Hard-coded ZooKeeper Replication Secret 'ch4n63m3' in Central Dogma Server

CVE-2026-11746 is a critical vulnerability in Central Dogma Server prior to version 0.84.0, where an embedded ZooKeeper replication secret silently falls back to a publicly known, hard-coded default string ('ch4n63m3'). Remote attackers with access to the replication network can authenticate as legitimate cluster peers, potentially leading to unauthorized data exposure, state manipulation, or complete cluster takeover.

Amit Schendel
Amit Schendel
7 views•6 min read
•1 day ago•CVE-2026-56665
4.2

CVE-2026-56665: Logical Validation Bypass in ZITADEL External JWT Identity Provider

A logical verification flaw in ZITADEL's external JWT Identity Provider validation allows attackers to bypass session expiration checks. If an incoming JWT lacks the 'exp' claim, the system skips validation entirely, creating an indefinitely valid session. This issue has been addressed in versions 3.4.12 and 4.15.2.

Alon Barad
Alon Barad
6 views•7 min read
•1 day ago•CVE-2026-59149
6.5

CVE-2026-59149: Sibling Directory Path Traversal in Mockoon Backend Server

CVE-2026-59149 identifies a directory traversal vulnerability in `@mockoon/commons-server`, the backend mock-server library powering the Mockoon application. The flaw occurs in the path containment validation logic used during raw file response generation. An unauthenticated attacker can exploit this weakness to retrieve arbitrary files from sibling directories sharing a common prefix with the designated static base directory.

Amit Schendel
Amit Schendel
9 views•5 min read
•1 day ago•CVE-2026-59148
8.8

CVE-2026-59148: Unauthenticated Administrative API and CORS Misconfiguration in Mockoon

An in-depth analysis of CVE-2026-59148, a high-severity flaw in Mockoon where unauthenticated administrative endpoints and a wildcard Cross-Origin Resource Sharing (CORS) policy allow remote execution, state poisoning, and credential theft.

Alon Barad
Alon Barad
11 views•6 min read
•1 day ago•CVE-2026-56666
4.8

CVE-2026-56666: Account Takeover via Improper Email Verification in ZITADEL Federated Identity Handler

An improper authentication vulnerability (CWE-287) in ZITADEL's external identity provider handler before version 4.15.3 allows remote attackers to perform complete account takeover. When auto-linking by email is enabled, ZITADEL verifies that the local target account has a verified email address but fails to verify if the external provider confirmed ownership of that same email. Attackers can exploit this by registering an unverified account with a victim's email address on a permissive external provider, leading to unauthorized account binding and persistent access.

Amit Schendel
Amit Schendel
7 views•7 min read