CVE-2026-107286: Pydantic AI Concurrency Limitation Issue Leading to Resource Locking

pydantic-ai Updated 09 Oct 2026

Summary

08/10/2026
Yes i
High
7.5

CVE-2026-107286: Pydantic AI: Concurrency-limited models can keep their slot when a streamed request ends early. Affects pydantic-ai versions >= 2.10.0, < 2.53.0. Fixed in 2.53.0. How to fix ↓

Also tracked for

The same CVE-2026-107286 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Pydantic AI is a Python library designed for data validation and settings management using Python type annotations. It provides a robust framework for building data models and managing their lifecycle, including support for concurrency-limited models. However, a recent vulnerability has been identified that affects the concurrency management of these models, particularly in streaming scenarios, which can lead to resource locking and degraded application performance.

Vulnerability Detail

The vulnerability arises from the interaction between the ConcurrencyLimitedModel and the anyio.CapacityLimiter used in Pydantic AI. When a streamed request ends prematurely, the slot that was acquired for concurrency may not be released properly, leading to a situation where the slot remains occupied. This can prevent subsequent requests from proceeding, effectively causing a denial of service for clients trying to access the streaming endpoint. The issue is exacerbated when multiple clients repeatedly start and disconnect streams, as the completed requests retain their slots. This vulnerability is particularly critical for applications that share a long-lived model limiter across requests.

How To Fix

Latest published version: 2.60.0 as of 23 Oct 2026

pip install --upgrade "pydantic-ai==2.60.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.53.0

This is the first release that contains the fix.

pip install --upgrade "pydantic-ai==2.53.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading is not immediately feasible, consider using the agent-level max_concurrency setting instead of a concurrency-limited model. Additionally, avoid using streaming runs through a concurrency-limited model to mitigate the risk of resource locking.

Conclusion

The vulnerability identified as CVE-2026-107286 in Pydantic AI poses a significant risk to applications utilizing concurrency-limited models, particularly in streaming contexts. It is crucial for developers to upgrade to the patched versions or implement the suggested workarounds to mitigate the risks associated with this issue.

See every vulnerability recorded for pydantic-ai →

Share this vulnerability

FAQ

The vulnerability can lead to resource locking, preventing new requests from being processed, which may result in denial of service for clients.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

Versions of Pydantic AI starting from 2.10.0 up to 2.52.0 are affected by this vulnerability.

If immediate upgrading is not possible, use the agent-level max_concurrency setting or avoid streaming runs through a concurrency-limited model.

The CVSS score of this vulnerability is 7.5, indicating a high severity level.

Related vulnerabilities

Recent vulnerabilities recorded for pydantic-ai.

How To Fix

Latest published version: 2.60.0 as of 23 Oct 2026

pip install --upgrade "pydantic-ai==2.60.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.53.0

This is the first release that contains the fix.

pip install --upgrade "pydantic-ai==2.53.0"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback