← Back to results
Vulnerability record · public intelligence
CVE-2026-107286
HIGH

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

Published Oct 8, 2026 · Updated Nov 3, 2026

Severity · CVSSHIGH · Not scored
Known exploitationNot listed
EPSS / likelihood0.45%
QFinch risk scoreNot available

Original summary

Normalized public record · Updated Nov 3, 2026

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

Publisher and source text is retained separately from QFinch interpretation.

QFinch assessment

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.

Technical context

The 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. Early termination includes stopping iteration, a consumer exception, and cancellation. Fully consuming streamtext() with its default debounceby=0.1 can also reach the cross-task release path. Fully consumed streams must therefore not be assumed safe.

Evidence: public source records

Affected products

Affected scope reported by the available public evidence
Affected package, product or rangeFix status
Consult the referenced vendor advisory for affected versions.Consult source advisory

Matching a version is only one part of assessing exposure. QFinch has not assessed your environment on this public page.

Remediation

Apply the vendor-supported fixed release or mitigation, then verify the affected component is no longer reachable.

  1. Confirm the affected product and reachable code path exist in your environment.
  2. Apply the vendor-supported patch or mitigation from the primary advisory.
  3. Rescan the exact deployed revision and retain verification evidence.
Review primary references

Evidence coverage

FIRST-EPSSCVE-LIST-V5
SSVC priority
MEDIUM
Confidence
Not available
Aliases
None reported

Scores appear only when corresponding evidence exists. Missing data is never interpreted as zero risk.

Sources and record history

  1. Security advisory ↗
  2. Source repository ↗
  3. Patch commit ↗
  4. Source repository ↗

Record history

Published Oct 8, 2026 · Last refreshed Nov 3, 2026