CVE-2026-54249

CVE-2026-54249 is a medium-severity server-side request forgery (SSRF) vulnerability in pydantic-ai-slim (pip), affecting versions >= 1.65.0, < 1.106.0. It is fixed in 1.106.0, 2.0.0b6.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Pydantic AI: Unvalidated UploadedFile references in UI adapters allow server-side file access using the application's credentials

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.

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.

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.

Untrusted input controls the target URL of a server-initiated request, which may reach internal services not otherwise accessible from outside. Typical impact: access to internal metadata services, internal APIs, or cloud credentials.

CVE-2026-54249 has a CVSS score of 6.8 (Medium). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.106.0, 2.0.0b6); upgrading removes the vulnerable code path.

Affected versions

pydantic-ai-slim (>= 1.65.0, < 1.106.0) pydantic-ai-slim (>= 2.0.0b1, < 2.0.0b6) pydantic-ai (>= 1.65.0, < 1.106.0) pydantic-ai (>= 2.0.0b1, < 2.0.0b6)

Security releases

pydantic-ai-slim → 1.106.0 (pip) pydantic-ai-slim → 2.0.0b6 (pip) pydantic-ai → 1.106.0 (pip) pydantic-ai → 2.0.0b6 (pip)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

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.

Frequently Asked Questions

  1. What is CVE-2026-54249? CVE-2026-54249 is a medium-severity server-side request forgery (SSRF) vulnerability in pydantic-ai-slim (pip), affecting versions >= 1.65.0, < 1.106.0. It is fixed in 1.106.0, 2.0.0b6. Untrusted input controls the target URL of a server-initiated request, which may reach internal services not otherwise accessible from outside.
  2. How severe is CVE-2026-54249? CVE-2026-54249 has a CVSS score of 6.8 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2026-54249?
    • pydantic-ai-slim (pip) (versions >= 1.65.0, < 1.106.0)
    • pydantic-ai (pip) (versions >= 1.65.0, < 1.106.0)
  4. Is there a fix for CVE-2026-54249? Yes. CVE-2026-54249 is fixed in 1.106.0, 2.0.0b6. Upgrade to this version or later.
  5. Is CVE-2026-54249 exploitable, and should I be worried? Whether CVE-2026-54249 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2026-54249 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2026-54249?
    • Upgrade pydantic-ai-slim to 1.106.0 or later
    • Upgrade pydantic-ai-slim to 2.0.0b6 or later
    • Upgrade pydantic-ai to 1.106.0 or later
    • Upgrade pydantic-ai to 2.0.0b6 or later

Other vulnerabilities in pydantic-ai-slim

Stop the waste.
Protect your environment with Kodem.