High (AgentArmorHQ estimate)Other

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

Product
Pydantic AI (pydantic-ai, pydantic-ai-slim)
CVE
CVE-2026-107286
Affected
pydantic-ai and pydantic-ai-slim 2.10.0 to before 2.53.0
Fixed in
2.53.0

Last verified against sources: October 26, 2026

Am I affected?

Pydantic AI (pydantic-ai, pydantic-ai-slim): affected pydantic-ai and pydantic-ai-slim 2.10.0 to before 2.53.0. Fixed in 2.53.0.

  • Check your version: run pip show pydantic-ai. Versions >= 2.10.0, < 2.53.0 of pydantic-ai are affected. [1]
  • Check your version: run pip show pydantic-ai-slim. Versions >= 2.10.0, < 2.53.0 of pydantic-ai-slim are affected. [1]

What to do now

  1. Upgrade to the fixed version: run pip install --upgrade "pydantic-ai>=2.53.0" (first patched version 2.53.0). [1]
  2. Upgrade to the fixed version: run pip install --upgrade "pydantic-ai-slim>=2.53.0" (first patched version 2.53.0). [1]
  3. Upgrade pydantic-ai to 2.53.0. [1]
  4. Upgrade pydantic-ai-slim to 2.53.0. [1]
  5. If you cannot upgrade yet, use the agent-level max_concurrency setting instead of a concurrency-limited model. [1]
  6. If you cannot upgrade yet, avoid streaming runs through a concurrency-limited model. [1]

General practice, not from the source: if the affected software could read tokens or credentials, rotate them after upgrading; pin versions and review changes before updating tools your agents run.

Discuss this incident

What happened

  • A streamed request can release its concurrency slot from a different task than the one that took it. [1]
  • The limiter rejects that release, so the slot stays occupied even after the request has ended. [1]
  • This can happen when a stream ends early, and also when a stream is fully consumed using the default stream_text() debouncing. [1]
  • Agent-level max_concurrency and non-streaming model requests are not affected. [1]

Impact

  • A client can repeatedly start a stream and disconnect, and the completed requests keep their slots. [1]
  • Eventually later requests that share the limiter cannot proceed. [1]
  • Cleanup can raise a RuntimeError, and a later request on the borrowing task can also fail. [1]

What was done

  • Patched releases of pydantic-ai and pydantic-ai-slim were published. [1]
  • The advisory says to upgrade to a patched release. [1]

Sources

  1. GHSA-6fqq-452j-qhrp — GitHub Advisory Database

Every statement above was checked against these sources before publishing. Spotted an error? Tell us and we will correct it with a dated note.

Share advisory brief with your team

Copy a plain-text summary for Slack, GitHub issues, or team security channels.

Brief
[CVE-2026-107286] Pydantic AI: concurrency-limited models can keep their slot when a streamed request ends early
Product: Pydantic AI (pydantic-ai, pydantic-ai-slim) | Affected: pydantic-ai and pydantic-ai-slim 2.10.0 to before 2.53.0 | Fixed in: 2.53.0
Summary: A streamed request can release its concurrency slot from a different task than the one that took it.
Source & remediation on AgentArmorHQ: https://agentarmorhq.com/incidents/2026/10/cve-2026-107286-pydantic-ai-pydantic-ai-pydantic-ai-slim
Was this page useful?

Corrections

Report an error or request a correction. We review requests within 5 business days and add a dated correction note.

10 to 2,000 characters. A link to a source helps. Stored as plain text.

Discussions for CVE-2026-107286

Ask questions or share configuration tips. Governed by our Community Rules & Terms.

No posts match this filter yet.

Be the first to ask a question or share a working tip.

Check before you install

Paste a package name or a GitHub link and get a clear answer in seconds: Block, Review or No known issues. No account needed.

Check a package

Questions? Contact us