GHSA-h7p7-w5gc-xj3w: SSRF

Published Aug 13, 2026
·
Updated

Summary

A client that can submit message history to a Pydantic AI UI adapter can reference arbitrary files in the application's model-provider or cloud-storage account. The server forwards the reference to the model provider, which fetches it using the server's own credentials, allowing the client to read files it should not have access to.

Details

UI adapters reconstruct file parts from client-submitted message history and forward them to the model provider. File URL parts are validated against a scheme allowlist before being forwarded, but 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, a client that crafts message history containing an attacker-chosen UploadedFile can cause the server to read objects belonging to its own account or to other tenants, given a referenceable identifier.

Impact

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.

Patches

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.

Workarounds

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 Software

4 affected componentsFixes available
pip/pydantic-ai>=2.0.0b1<2.0.0b6
2.0.0b6
pip/pydantic-ai>=1.65.0<1.106.0
1.106.0
pip/pydantic-ai-slim>=2.0.0b1<2.0.0b6
2.0.0b6
pip/pydantic-ai-slim>=1.65.0<1.106.0
1.106.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/pydantic-ai to a version that resolves this vulnerability.

    Fixed in 2.0.0b6
  2. Upgrade

    Upgrade pip/pydantic-ai to a version that resolves this vulnerability.

    Fixed in 1.106.0
  3. Upgrade

    Upgrade pip/pydantic-ai-slim to a version that resolves this vulnerability.

    Fixed in 2.0.0b6
  4. Upgrade

    Upgrade pip/pydantic-ai-slim to a version that resolves this vulnerability.

    Fixed in 1.106.0
  5. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 1.106.0
  6. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 2.0.0b6
  7. Configuration

    If you cannot upgrade, do not pass untrusted client-submitted message history to the agent via the UI adapter. Alternatively, strip any `UploadedFile` parts from incoming messages before running the agent.

    Application using a Pydantic AI UI adapter (e.g., Vercel AI adapter) client-submitted message history handling = Do not pass untrusted client-submitted message history to the agent through the UI adapter (or strip UploadedFile parts)
  8. Compensating control

    If you cannot upgrade, ensure UI adapters/your integration do not forward `UploadedFile` references (e.g., provider file IDs or cloud-storage URIs like `s3://...` or `gs://...`) from untrusted client-submitted message history to the model provider.

Event History

Aug 13, 2026
Advisory Published
via GitHub·02:16 PM
Data Sourced
via GitHub·02:16 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of GHSA-h7p7-w5gc-xj3w?

The severity of GHSA-h7p7-w5gc-xj3w is medium with a score of 6.8.

2

How do I fix GHSA-h7p7-w5gc-xj3w?

To fix GHSA-h7p7-w5gc-xj3w, upgrade the affected libraries to the latest patched versions of pip/pydantic-ai or pip/pydantic-ai-slim.

3

What is the risk associated with GHSA-h7p7-w5gc-xj3w?

The risk associated with GHSA-h7p7-w5gc-xj3w is rated at 40, indicating a notable threat level.

4

What type of vulnerability is GHSA-h7p7-w5gc-xj3w?

GHSA-h7p7-w5gc-xj3w is a Server Side Request Forgery (SSRF) vulnerability.

5

What software is affected by GHSA-h7p7-w5gc-xj3w?

The affected software includes pip/pydantic-ai and pip/pydantic-ai-slim.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203