Categories
CVE-2026-107286 high CVSS 7.5

Vulnerability in pydantic-ai (CVE-2026-107286)

Summary

Vulnerability in pydantic-ai (CVE-2026-107286). Risk of unauthorized operations or information disclosure. Exploitable via ConcurrencyLimitedModel. Mitigation: upgrade to 2.53.0 or later.

Original description

The description as published by the source.

This issue was posted by Codex Desktop using gpt-6.1-sol on behalf of David.

Summary

Applications that wrap a model with ConcurrencyLimitedModel or limit_model_concurrency 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 stream_text() 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 max_concurrency and non-streaming model requests are not affected by this defect.

Details

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 stream_text() with its default `debounce_by=…

Source: NIST National Vulnerability Database NVD GitHub Advisory

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2026-107286 has been found in pydantic-ai.
Attackers can target a specific entry point like ConcurrencyLimitedModel over the network to misuse the product.
Risk of unauthorized operations or information disclosure. CVSS score: 7.5/10.
What to do: upgrade pydantic-ai to 2.53.0 or later.
If unsure, ask your IT team or search "pydantic-ai CVE-2026-107286" on the vendor's site.

CVE-2026-107286 (pydantic-ai) — CWE-772 / CVSS v3 7.5
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: ConcurrencyLimitedModel / limit_model_concurrency / max_concurrency / anyio.CapacityLimiter
Patched: 2.53.0 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

A vulnerability (CWE-772) exists in pydantic-ai. Attackers reach the vulnerable code path via ConcurrencyLimitedModel without authentication.

📍 Affected scope

Check the vendor advisory for the affected versions of pydantic-ai. Attack surface: ConcurrencyLimitedModel / limit_model_concurrency / max_concurrency / anyio.CapacityLimiter.

🔥 Severity

Severity: High (CVSS 7.5/10). Risk of unauthorized operations or information disclosure.

🔧 How to fix

Update to 2.53.0.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'pydantic-ai' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r 'pydantic-ai' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で pydantic-ai を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patch patch
    Upgrade pydantic-ai to 2.53.0

    ステージング環境で 2.53.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

pip pydantic-ai
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.53.0"}]}]
pip pydantic-ai-slim
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.53.0"}]}]
PyPI pydantic-ai
[{"type":"ECOSYSTEM","events":[{"introduced":"2.10.0"},{"fixed":"2.53.0"}]}]
PyPI pydantic-ai-slim
[{"type":"ECOSYSTEM","events":[{"introduced":"2.10.0"},{"fixed":"2.53.0"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details