Skip to content

← Public intelligence

PyPI package

pydantic-ai-slim

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

14 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. High, CVSS 7.5PyPIAmendedPublished

    Pydantic AI: Concurrency-limited models can keep their slot when a streamed request ends early

    CVE-2026-107286 · GHSA-6fqq-452j-qhrp

    Affected
    • PyPI pydantic-ai-slim >= 2.10.0, < 2.53.0
    Fixed in
    2.53.0· Vendor fix available
    Issue
    This issue was posted by Codex Desktop using gpt-6.1-sol on behalf of David. Summary Applications that wrap a model with ConcurrencyLimitedModel or limitmodelconcurrency can permanently lose shared concurrency capacity when a streamed request releases its slot from a different task than the one that acquired it. This can happen when a stream ends early, and also when a stream is fully consumed using the default streamtext() debouncing. In an application that exposes an affected streaming endpoint to network clients and shares a long-lived model limiter across requests, a client can repeatedly start a stream and disconnect. The completed requests retain their slots, eventually preventing subsequent requests that share the limiter from proceeding. Agent-level maxconcurrency and non-streaming model requests are not affected by this defect. Details The built-in limiter uses anyio.CapacityLimiter, which associates each acquired slot with its borrowing task. Pydantic AI's streaming…

    Recommended action: Upgrade to 2.53.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →
  2. Medium, CVSS 6.5PyPIAmendedPublished

    Pydantic AI: Excessive resource use when local web fetching converts nested HTML

    CVE-2026-107287 · GHSA-v36g-jcw9-x7cw

    Affected
    • PyPI pydantic-ai-slim >= 1.77.0, < 1.107.7; >= 2.0.0b1, < 2.52.0
    Fixed in
    1.107.72.52.0· Vendor fix available
    Issue
    Applications using Pydantic AI's local web-fetch tool can experience excessive CPU and memory use when it converts attacker-controlled HTML. An agent must fetch the affected page; provider-native web fetching is not affected. Details Nested block elements cause HTML-to-Markdown conversion to reprocess accumulated text at each level and can greatly expand the intermediate output. The response-body limit bounds downloaded bytes, while the returned-content limit is applied only after conversion. On current releases, conversion runs in a worker thread but can still consume substantial resources and delay other work in the process. Older releases performed conversion on the event loop. Mitigation Upgrade to a patched release of pydantic-ai or pydantic-ai-slim. If you cannot upgrade yet, avoid using local web fetching for attacker-controlled HTML.

    Recommended action: Upgrade to 2.52.0 or 1.107.7 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →
  3. Medium, CVSS 6.4PyPIAmendedPublished

    Pydantic AI Web chat UI (Agent.to_web(), clai web): the local chat endpoint does not validate the Host header

    CVE-2026-107292 · GHSA-q2xc-rrxj-58x9

    Affected
    • PyPI pydantic-ai-slim >= 1.34.0, < 1.107.5; >= 2.0.0b1, < 2.30.0
    Fixed in
    1.107.52.30.0· Vendor fix available
    Issue
    The Pydantic AI development web chat UI (Agent.toweb(), clai web) does not validate the Host header of incoming requests. A website a developer visits can use DNS rebinding to make requests to a chat UI running on that developer's machine appear same-origin to the browser, causing the served agent to run and to execute its tools with the privileges and credentials of the local process. Details Once a name the attacker controls resolves to the loopback address, the browser treats the request as same-origin, so neither an Origin check nor a CSRF token constrains it — a same-origin page can read the served UI and any token in it. Binding the web UI to localhost — the default — does not prevent this. Impact Applications and developers serving an agent through Agent.toweb() or clai web. The consequences depend on the tools the served agent exposes, and can include data disclosure as well as unwanted tool side effects. Current browser protections reduce but do not remove this…

    Recommended action: Upgrade to 2.30.0 or 1.107.5 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →
  4. High, CVSS 7.6PyPIAmendedPublished

    Pydantic AI Web chat UI (Agent.to_web(), clai web): a website visited by the developer can trigger agent runs and server-side tool execution on the local chat endpoint

    CVE-2026-107295 · GHSA-h4xc-3qfq-jf93

    Affected
    • PyPI pydantic-ai-slim >= 1.34.0, < 1.107.4; >= 2.0.0b1, < 2.28.0
    Fixed in
    1.107.42.28.0· Vendor fix available
    Issue
    The Pydantic AI development web chat UI (Agent.toweb(), clai web) did not check the content type of requests to its chat endpoint. This allowed a website visited by a developer to submit a request to a chat UI running on that developer's machine, causing the served agent to run and to execute its tools with the privileges and credentials of the local process. Binding the web UI to localhost — the default — does not prevent this, because a page open in the developer's browser can reach the loopback address. Impact Applications and developers serving an agent through Agent.toweb() or clai web. The consequences depend on the tools the served agent exposes, and can include data disclosure as well as unwanted tool side effects. Tools marked requiresapproval=True were not protected either, because the endpoint trusts approval decisions relayed by the client. Mitigation Upgrade to a patched version. The chat endpoint now requires Content-Type: application/json and rejects other…

    Recommended action: Upgrade to 2.28.0 or 1.107.4 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →
  5. Low, CVSS 2.3PyPIAmendedPublished

    Pydantic AI OpenTelemetry instrumentation: retry prompt content is not redacted when include_content=False

    CVE-2026-107293 · GHSA-3gh4-cghq-f8v4

    Affected
    • PyPI pydantic-ai-slim >= 0.3.4, < 1.107.4; >= 2.0.0b1, < 2.27.1
    Fixed in
    1.107.42.27.1· Vendor fix available
    Issue
    Pydantic AI's OpenTelemetry instrumentation supports InstrumentationSettings(includecontent=False) to exclude message content — user prompts, model completions, tool call arguments and responses — from exported telemetry, so that agents can be monitored without sending sensitive content to the observability backend. Retry prompts — the feedback messages Pydantic AI sends back to the model when its output fails validation or an output validator raises ModelRetry — were not covered by this setting when they were not associated with a tool call, as with structured output modes that don't use tool calls (e.g. NativeOutput or PromptedOutput) and output validators applied to text output. Their full content was recorded on model request spans even with includecontent=False. Since validation feedback can quote invalid values from the model's response, message content that the setting was configured to withhold could reach the telemetry backend. Details Retry prompts without an…

    Recommended action: Upgrade to 2.27.1 or 1.107.4 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →
  6. Medium, CVSS 6.5PyPIAmendedPublished

    Pydantic AI: Unbounded memory use when downloading remote content via web_fetch or FileUrl

    CVE-2026-107294 · GHSA-v2xh-2vp8-57h8

    Affected
    • PyPI pydantic-ai-slim >= 1.77.0, < 1.107.2; >= 2.0.0b1, <= 2.23.0
    Fixed in
    2.24.01.107.2· Vendor fix available
    Issue
    Several remote-content download paths in Pydantic AI buffered the entire HTTP response body into memory before enforcing any size limit. An application that exposes the local web-fetch tool (webfetchtool, or the WebFetch capability's local fallback) to untrusted prompts can be driven to fetch an attacker-chosen URL that streams a very large body, exhausting process memory and crashing the worker. The same unbounded buffering applied to FileUrl media downloads (ImageUrl, DocumentUrl, VideoUrl, AudioUrl). This is an availability issue only. SSRF protections (scheme allowlist, private-IP and cloud-metadata blocking) are unaffected; there is no confidentiality or integrity impact. Details The download helpers read the full response body before applying content-size controls, so an existing text-length limit only truncated after the whole body was already in memory, and media downloads had no wire-level cap at all. A single large response could grow process memory without bound .…

    Recommended action: Upgrade to 2.24.0 or 1.107.2 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →
  7. Medium, CVSS 6.5PyPIAmendedPublished

    Pydantic AI: Event loop blocked by quadratic title extraction in web_fetch

    CVE-2026-107290 · GHSA-fpf4-vwcp-v4hp

    Affected
    • PyPI pydantic-ai-slim >= 1.77.0, < 1.107.6; >= 2.0.0b1, < 2.44.0
    Fixed in
    1.107.62.44.0· Vendor fix available
    Issue
    The local web-fetch tool (webfetchtool, also used as the WebFetch capability's local fallback) processed responses with several steps whose running time grows quadratically with the size of certain server-controlled inputs, and ran them on the event loop: decoding the body with whichever charset the server declared, extracting the page title with a backtracking regular expression, and converting the HTML to markdown. An application that exposes this tool to untrusted prompts can be steered to fetch an attacker-controlled page of a megabyte or two that blocks the event loop for minutes, stalling every other coroutine in the process — other agent runs, other requests being served — for the duration. This is an availability issue only. SSRF protections and the download size limit introduced in GHSA-v2xh-2vp8-57h8 are unaffected; that limit bounds how much is downloaded, not how long the response takes to process. Details Title extraction used a backtracking pattern over the raw…

    Recommended action: Upgrade to 2.44.0 or 1.107.6 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →
  8. Low, CVSS 2.3PyPIAmendedPublished

    Pydantic AI OpenTelemetry instrumentation: exception events on tool and agent run spans include content when include_content=False

    CVE-2026-107291 · GHSA-4x9p-g9wm-8q7f

    Affected
    • PyPI pydantic-ai-slim >= 0.3.4, < 1.107.6; >= 2.0.0b1, < 2.44.0
    Fixed in
    1.107.62.44.0· Vendor fix available
    Issue
    Pydantic AI's OpenTelemetry instrumentation supports InstrumentationSettings(includecontent=False) to exclude message content — user prompts, model completions, tool call arguments and responses, and any other message content — from exported telemetry, so that agents can be monitored without sending sensitive content to the observability backend. The message attributes honoured the setting. Several other parts of the same spans did not, and exported content regardless of it: - Exceptions. Recorded as OpenTelemetry exception events, with their message and stack trace, on tool, agent run, model request, embedding and image generation spans, and on realtime session spans. The message of the exception carrying a tool's ModelRetry or ToolFailed feedback is the text sent back to the model, which can quote tool arguments and results. When a tool ran out of retries, the error that ended the run was chained from the last retry, so its stack trace repeated that text on the run span.…

    Recommended action: Upgrade to 2.44.0 or 1.107.6 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →
  9. Medium, CVSS 6.8PyPIAmendedPublished

    Pydantic AI: SSRF cloud-metadata blocklist bypass via IPv6 zone identifiers

    CVE-2026-107289 · GHSA-vmxc-h2x2-jmf3

    Affected
    • PyPI pydantic-ai-slim >= 1.56.0, < 1.107.6; >= 2.0.0b1, < 2.44.0
    Fixed in
    1.107.62.44.0· Vendor fix available
    Issue
    When an application using Pydantic AI opts a URL into local network access — either a FileUrl with forcedownload='allow-local', or webfetchtool(allowlocalurls=True) — the cloud-metadata blocklist could be bypassed by appending an IPv6 zone identifier to a metadata address (for example fd00:ec2::254%251). The host ignores the zone identifier on a destination that is not link-local and delivers the request to the metadata endpoint anyway, exposing cloud IAM short-term credentials. This is an incomplete fix of GHSA-cqp8-fcvh-x7r3 / CVE-2026-46678 and GHSA-cg7w-rg45-pc59 / CVE-2026-48782, themselves follow-ups to CVE-2026-25580. The parent advisory's remediation guaranteed that cloud metadata endpoints are always blocked, even with local access allowed. That guarantee did not hold for zone-scoped spellings of the IPv6 metadata endpoints. Details The cloud-metadata guard compared IPv6 addresses against its blocklist by set membership. Python includes the zone identifier in…

    Recommended action: Upgrade to 2.44.0 or 1.107.6 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.com (1)osv.dev (2)Source checked Evidence →
  10. Medium, CVSS 6.8PyPIAmendedPublished

    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

    Affected
    • PyPI pydantic-ai-slim >= 1.65.0, < 1.106.0; >= 2.0.0b1, < 2.0.0b6
    Fixed in
    1.106.02.0.0b6· Vendor fix available
    Issue
    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…

    Recommended action: Upgrade to 2.0.0b6 (pre-release) or 1.106.0 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:github.comSource checked Evidence →
  11. Medium, CVSS 6.8PyPIAmendedPublished

    pydantic-ai: SSRF blocklist bypass via IPv4-compatible, SIIT/IVI, and local NAT64 IPv6 addresses (incomplete fix of CVE-2026-46678)

    CVE-2026-48782 · GHSA-cg7w-rg45-pc59

    Affected
    • PyPI pydantic-ai-slim >= 1.56.0, < 1.102.0; >= 2.0.0b1, < 2.0.0b3
    Fixed in
    2.0.0b31.102.0· Vendor fix available
    Issue
    When an application using Pydantic AI opts a URL into forcedownload='allow-local' (which disables the default block on private/internal IPs) and runs on a network that routes the affected IPv6 transition forms (NAT64- or ISATAP-configured networks), the cloud-metadata blocklist could be bypassed by encoding the metadata IP in an IPv6 transition form that the previous fix did not decode — IPv4-compatible IPv6 (::a.b.c.d), the NAT64 RFC 8215 local-use prefix (64:ff9b:1::/48), operator-chosen NAT64 prefixes, or ISATAP. The IPv6 wrapper is then delivered to the underlying IPv4 metadata endpoint, exposing cloud IAM short-term credentials. The bypass is exploitable only in environments whose network actually routes these forms — NAT64-configured networks (IPv6-only or dual-stack-with-NAT64 deployments, including some Kubernetes setups) for the NAT64 variants, or networks with an ISATAP tunnel for ISATAP. A standard dual-stack cloud VM or container does not route them and is not…

    Recommended action: Upgrade to 2.0.0b3 (pre-release) or 1.102.0 by release line, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  12. Medium, CVSS 6.8PyPIAmendedPublished

    Pydantic AI: SSRF cloud-metadata blocklist bypass via IPv4-mapped IPv6 (Incomplete fix of CVE-2026-25580)

    CVE-2026-46678 · GHSA-cqp8-fcvh-x7r3

    Affected
    • PyPI pydantic-ai-slim >= 1.56.0, < 1.99.0
    Fixed in
    1.99.0· Vendor fix available
    Issue
    When an application using Pydantic AI opts a URL into forcedownload='allow-local' (which disables the default block on private/internal IPs), the cloud-metadata blocklist could be bypassed by encoding the metadata IP in an IPv6 transition form (IPv4-mapped IPv6, 6to4, or NAT64). Dual-stack and translated networks route the IPv6 wrapper to the underlying IPv4 endpoint, exposing cloud IAM short-term credentials. This is an incomplete fix of GHSA-2jrp-274c-jhv3 / CVE-2026-25580. The parent advisory's remediation guaranteed that "cloud metadata endpoints are always blocked, even with allow-local." That guarantee did not hold for IPv6-encoded forms of the metadata IPs. Severity Same impact metrics as the parent CVE, but materially narrower attack surface (AC:H instead of AC:L), because exploitation requires the application to have opted into allow-local on a URL influenced by untrusted input. Who Is Affected Applications are affected only if they explicitly opt for FileUrl…

    Recommended action: Upgrade to 1.99.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  13. High, CVSS 7.1PyPIAmendedPublished

    Pydantic AI has Stored XSS via Path Traversal in Web UI CDN URL

    CVE-2026-25640 · GHSA-wjp5-868j-wqv7

    Affected
    • PyPI pydantic-ai-slim >= 1.34.0, < 1.51.0
    Fixed in
    1.51.0· Vendor fix available
    Issue
    A Path Traversal vulnerability in the Pydantic AI web UI allows an attacker to serve arbitrary JavaScript in the context of the application by crafting a malicious URL. If a victim clicks the link or visits it via an iframe, attacker-controlled code executes in their browser, enabling theft of chat history and other client-side data. This vulnerability only affects applications that use: - Agent.toweb to serve a chat interface - clai web to serve a chat interface from the CLI These are typically run locally (on localhost), but may also be deployed on a remote server. Description The web UI serves its frontend HTML by fetching it from a CDN. In affected versions, the CDN URL is constructed using a version query parameter from the request URL. This parameter is not validated, allowing path traversal sequences that cause the server to fetch and serve attacker-controlled HTML/JavaScript from an arbitrary source on the same CDN, instead of the legitimate chat UI package. Who Is…

    Recommended action: Upgrade to 1.51.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  14. High, CVSS 8.6PyPIAmendedPublished

    Pydantic AI has Server-Side Request Forgery (SSRF) in URL Download Handling

    CVE-2026-25580 · GHSA-2jrp-274c-jhv3

    Affected
    • PyPI pydantic-ai-slim >= 0.0.26, < 1.56.0
    Fixed in
    1.56.0· Vendor fix available
    Issue
    A Server-Side Request Forgery (SSRF) vulnerability exists in Pydantic AI's URL download functionality. When applications accept message history from untrusted sources, attackers can include malicious URLs that cause the server to make HTTP requests to internal network resources, potentially accessing internal services or cloud credentials. This vulnerability only affects applications that accept message history from external users, such as those using: - Agent.toweb or clai web to serve a chat interface - VercelAIAdapter for Vercel AI SDK integration - AGUIAdapter or Agent.toagui for AG-UI protocol integration - Custom APIs that accept message history from user input Applications that only use hardcoded or developer-controlled URLs are not affected. Description The downloaditem() helper function downloads content from URLs without validating that the target is a public internet address. When user-supplied message history contains URLs, attackers can: 1. Access internal…

    Recommended action: Upgrade to 1.56.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →