Read the docs

Pydantic AI keeps concurrency slots after streams end early

Priority LOW 39CWE-772Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
Denial of service
Confidentiality · integrity · availability
None · None · High
Fix status
Partial Red Hat: 2 without a fix

Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-772.

Summary

Pydantic AI from 2.10.0 before 2.53.0 has a flaw in streamed requests made through ConcurrencyLimitedModel or limit_model_concurrency. Shared concurrency slots can stay occupied after a stream ends early, is cancelled, or raises an exception, because the slot belongs to a different task than the one that cleans it up (CWE-772). A remote attacker without privileges or user interaction can eventually exhaust the shared limiter, blocking later requests and causing denial of service.

Written with Claude Haiku 5.5 from the sources below · 2026-10-29

Description from the CNA

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.0045 39th percentileScored 2026-11-07
Fix Partial pydantic-ai (pydantic): 2.53.0pydantic-ai-slim (pydantic): 2.53.0+2 more productsRed Hat: 2 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
Yes
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
pydanticpydantic-ai2.10.0 to before 2.53.02.53.0Patch availableCNA
pydanticpydantic-ai-slim2.10.0 to before 2.53.02.53.0Patch availableCNA
—pydantic-ai (PyPI)2.10.0 to before 2.53.02.53.0Patch availableGHSA-6fqq-452j-qhrp
—pydantic-ai-slim (PyPI)2.10.0 to before 2.53.02.53.0Patch availableGHSA-6fqq-452j-qhrp
  • pydantic-ai Vendorpydantic Affected 2.10.0 to before 2.53.0 Fixed in 2.53.0 Patch available CNA
  • pydantic-ai-slim Vendorpydantic Affected 2.10.0 to before 2.53.0 Fixed in 2.53.0 Patch available CNA
  • pydantic-ai (PyPI) Vendor— Affected 2.10.0 to before 2.53.0 Fixed in 2.53.0 Patch available GHSA-6fqq-452j-qhrp
  • pydantic-ai-slim (PyPI) Vendor— Affected 2.10.0 to before 2.53.0 Fixed in 2.53.0 Patch available GHSA-6fqq-452j-qhrp

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:pydantic:pydantic_ai:*:-:*:*:*:python:*:*2.10.0 to before 2.53.0Vulnerablepydantic
  • cpe:2.3:a:pydantic:pydantic_ai:*:-:*:*:*:python:*:* Versions 2.10.0 to before 2.53.0 Vulnerable ·pydantic

Remediation

Upgrade pydantic-ai and pydantic-ai-slim to version 2.53.0. The sources list no fixed version for Lightspeed Core or Red Hat Enterprise Linux AI (RHEL AI) 3.

Written with Claude Haiku 5.5 from the sources below · 2026-10-29

  • Fix · CNA pydantic-ai (pydantic) Fixed in 2.53.0
  • Fix · CNA pydantic-ai-slim (pydantic) Fixed in 2.53.0
  • Fix · GHSA-6fqq-452j-qhrp pydantic-ai (PyPI) Fixed in 2.53.0 Advisory →
  • Fix · GHSA-6fqq-452j-qhrp pydantic-ai-slim (PyPI) Fixed in 2.53.0 Advisory →

Vendor assessments

Red Hat

Red Hat rating: Important. Red Hat's page for this CVE →

ProductStatusPlan or fix
Lightspeed CoreAffectedNo fix yet
Red Hat Enterprise Linux AI (RHEL AI) 3AffectedNo fix yet

Timeline

  1. 2026-10-08 Threatist record created from CVE-2026-107286
  2. 2026-10-09 Alias added: GHSA-6fqq-452j-qhrp
  3. 2026-10-09 Fix available: PyPI/[email protected], PyPI/[email protected] · GHSA-6fqq-452j-qhrp
  4. 2026-10-09 CVSS score added · GHSA-6fqq-452j-qhrp
  5. 2026-10-09 Weakness changed · GHSA-6fqq-452j-qhrp
  6. 2026-10-09 6 new references · GHSA-6fqq-452j-qhrp
  7. 2026-10-09 Affected versions changed · Red Hat
  8. 2026-10-09 CVSS score added · Red Hat

References

  • TI-2026-20687 Pydantic AI Affected by Server-Side Request Forgery (SSRF) in URL Download Handling CVSS 3.1HIGH 8.6
  • TI-2026-46990 Incorrect authorization in pydantic-ai CVSS 3.1MEDIUM 6.5
  • TI-2026-69610 Cross-site requests run agent tools in pydantic-ai web chat CVSS 3.1HIGH 7.6
  • TI-2026-20740 Pydantic AI affected by Stored XSS via Path Traversal in Web UI CDN URL CVSS 3.1HIGH 7.1
  • TI-2026-69617 Pydantic AI blocklist bypass via IPv6 zone identifier allows SSRF CVSS 3.1MEDIUM 6.8
  • TI-2026-39151 Server-side request forgery in pydantic-ai CVSS 3.1MEDIUM 6.8
See all 15 →

Sources