pydantic-ai-slim is vulnerable to Denial of Service (DoS)
75
CVE Score
High
Denial of Service (DoS)
ConcurrencyLimitedModel and limit_model_concurrency acquire a slot on a shared anyio.CapacityLimiter on the task that starts a model stream, then release that slot from a different internal cleanup task when the stream ends early or finishes through the default stream_text() debouncing. The limiter rejects a release from a non-owning task, so the slot stays held after the request completes. Repeatedly starting and abandoning streaming requests against a shared limiter exhausts its slots and blocks every later request that shares it. The fix keeps slot acquisition and release on the same task.
Upgrade the pydantic-ai-slim and/or the pydantic-ai library to the patch version.
You are affected if you are using a version that falls within the vulnerable range and you share a ConcurrencyLimitedModel or limit_model_concurrency limiter across streaming model requests.
2.10.0 - 2.52.0
Fixed in 2.53.0pydantic-ai-slim is vulnerable to Denial of Service (DoS) in versions 2.10.0 - 2.52.0.
Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.
No credit card required | Scan results in 32 seconds.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.