Vulnerabilities in pkg:pypi/pydantic-ai-slim
PACKAGECVE-2026-107286 is a HIGH (CVSS 7.5) concurrency-limited models can keep their vulnerability (CWE-772: Missing Release of Resource after Effective Lifetime) affecting Pydantic AI libraries in the PyPI ecosystem. The issue involves concurrency-limited models can keep their slot when a streamed request ends early. Remediation is available by upgrading affected packages to version 2.53.0.
pkg:pypi/pydantic-ai-slim
Vulnerability advisories affecting package pkg:pypi/pydantic-ai-slim. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-6fqq-452j-qhrp | CVE-2026-107286 | HIGH | Pydantic AI: Concurrency-limited models can keep their slot when a streamed request ends early |
| GHSA-v36g-jcw9-x7cw | CVE-2026-107287 | MODERATE | Pydantic AI: Excessive resource use when local web fetching converts nested HTML |
| GHSA-q2xc-rrxj-58x9 | CVE-2026-107292 | MODERATE | Pydantic AI Web chat UI (`Agent.to_web()`, `clai web`): the local chat endpoint does not validate the `Host` header |
| GHSA-h4xc-3qfq-jf93 | CVE-2026-107295 | HIGH | 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 |
| GHSA-3gh4-cghq-f8v4 | CVE-2026-107293 | LOW | Pydantic AI OpenTelemetry instrumentation: retry prompt content is not redacted when `include_content=False` |
| GHSA-v2xh-2vp8-57h8 | CVE-2026-107294 | MODERATE | Pydantic AI: Unbounded memory use when downloading remote content via web_fetch or FileUrl |
| GHSA-fpf4-vwcp-v4hp | CVE-2026-107290 | MODERATE | Pydantic AI: Event loop blocked by quadratic title extraction in `web_fetch` |
| GHSA-4x9p-g9wm-8q7f | CVE-2026-107291 | LOW | Pydantic AI OpenTelemetry instrumentation: exception events on tool and agent run spans include content when `include_content=False` |
| GHSA-vmxc-h2x2-jmf3 | CVE-2026-107289 | MODERATE | Pydantic AI: SSRF cloud-metadata blocklist bypass via IPv6 zone identifiers |
| GHSA-h7p7-w5gc-xj3w | CVE-2026-54249 | MODERATE | Pydantic AI: Unvalidated UploadedFile references in UI adapters allow server-side file access using the application's credentials |
| GHSA-cg7w-rg45-pc59 | CVE-2026-48782 | MODERATE | pydantic-ai: SSRF blocklist bypass via IPv4-compatible, SIIT/IVI, and local NAT64 IPv6 addresses (incomplete fix of CVE-2026-46678) |
| GHSA-cqp8-fcvh-x7r3 | CVE-2026-46678 | MODERATE | Pydantic AI: SSRF cloud-metadata blocklist bypass via IPv4-mapped IPv6 (Incomplete fix of CVE-2026-25580) |
| GHSA-wjp5-868j-wqv7 | CVE-2026-25640 | HIGH | Pydantic AI has Stored XSS via Path Traversal in Web UI CDN URL |
| GHSA-2jrp-274c-jhv3 | CVE-2026-25580 | HIGH | Pydantic AI has Server-Side Request Forgery (SSRF) in URL Download Handling |
CVE-2026-107286 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2026-107286
To remediate this vulnerability, upgrade all affected Pydantic AI dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install pydantic-ai>=2.53.0
pip install pydantic-ai-slim>=2.53.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pydantic-ai
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-107286, inspect your installed packages using pip:
pip show pydantic-ai
Analyze the terminal output to locate any version of Pydantic AI in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.53.0), your application is affected.
Note: The pip show pydantic-ai command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-772: Missing Release of Resource after Effective Lifetime, where the product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed. In Pydantic AI, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-107286 Affected Pydantic AI Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pydantic-ai
|
PyPI |
≥ 2.10.0
< 2.53.0
|
2.53.0
|
|
pydantic-ai-slim
|
PyPI |
≥ 2.10.0
< 2.53.0
|
2.53.0
|
References
Frequently Asked Questions
What is CVE-2026-107286?
Which Pydantic AI versions are affected?
What version fixes CVE-2026-107286?
Is pydantic-ai affected?
Is pydantic-ai-slim affected?
What is the CVSS score of CVE-2026-107286?
What CWE is associated with CVE-2026-107286?
How can I check PyPI dependencies for CVE-2026-107286?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-6fqq-452j-qhrp",
"modified" : "2026-10-08T19:42:55Z",
"published" : "2026-10-08T19:42:55Z",
"aliases" : [ "CVE-2026-107286" ],
"summary" : "Pydantic AI: Concurrency-limited models can keep their slot when a streamed request ends early",
"details" : "> This issue was posted by Codex Desktop using gpt-6.1-sol on behalf of David.\n\n### Summary\n\nApplications that wrap a model with `ConcurrencyLimitedModel` or `limit_model_concurrency` 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 `stream_text()` debouncing.\n\nIn 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.\n\nAgent-level `max_concurrency` and non-streaming model requests are not affected by this defect.\n\n### Details\n\nThe built-in limiter uses `anyio.CapacityLimiter`, which associates each acquired slot with its borrowing task. Pydantic AI's streaming lifecycle can acquire the slot on the task consuming the stream and run cleanup on another internal task. The limiter rejects that release, so the slot remains occupied even after the request has ended. Cleanup can raise a `RuntimeError`; a later request on the borrowing task can also fail because that task still holds a slot.\n\nEarly termination includes stopping iteration, a consumer exception, and cancellation. Fully consuming `stream_text()` with its default `debounce_by=0.1` can also reach the cross-task release path. Fully consumed streams must therefore not be assumed safe.\n\n### Mitigation\n\nUpgrade to a patched release of `pydantic-ai` or `pydantic-ai-slim`. If you cannot upgrade yet, use the agent-level `max_concurrency` setting instead of a concurrency-limited model, or avoid streaming runs through a concurrency-limited model.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pydantic-ai"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.10.0"
}, {
"fixed" : "2.53.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "pydantic-ai-slim"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.10.0"
}, {
"fixed" : "2.53.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-6fqq-452j-qhrp"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-107286"
}, {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/pull/9478"
}, {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/commit/453f19feeb7ab1d789f9393b1723c6a73b3d77b2"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pydantic/pydantic-ai"
}, {
"type" : "WEB",
"url" : "https://github.com/pydantic/pydantic-ai/releases/tag/v2.53.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-772" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-10-08T19:42:55Z",
"nvd_published_at" : "2026-10-08T15:17:40Z"
}
}