Intel

AIKIDO-2026-380962

pydantic-ai-slim is vulnerable to Denial of Service (DoS)

Denial of Service (DoS)GHSA-6fqq-452j-qhrp Published 6 days ago

75

High Risk

This Affects:

PYTHONpydantic-ai-slim
2.10.0 - 2.52.0
Fixed in 2.53.0
Are you affected? Scan for Free

TL;DR

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.

Who does this affect?

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.

Background info

pydantic-ai-slim is vulnerable to Denial of Service (DoS) in versions 2.10.0 - 2.52.0.

How to fix this

Upgrade the pydantic-ai-slim and/or the pydantic-ai library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform