Vulnérabilité dans pydantic-ai (CVE-2026-107286)
Résumé
Vulnérabilité dans pydantic-ai (CVE-2026-107286). Risque d'opérations non autorisées ou de divulgation. Exploitable via ConcurrencyLimitedModel. Atténuation : mise à jour vers 2.53.0 ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
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
Résumé généré automatiquement
Assemblé par SecPulse à partir des données sources (CVSS, CWE, versions affectées) à l'aide de modèles, sans IA. Vérifiez la description d'origine et les références ci-dessous.
Une vulnérabilité référencée CVE-2026-107286 a été découverte dans pydantic-ai.
Des attaquants peuvent cibler un point d'entrée spécifique comme ConcurrencyLimitedModel à distance pour détourner le produit.
Risque d'opérations non autorisées ou de divulgation. Score CVSS : 7.5/10.
Action : mettez à jour pydantic-ai vers 2.53.0 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « pydantic-ai CVE-2026-107286 » sur le site de l'éditeur.
CVE-2026-107286 (pydantic-ai) — CWE-772 / CVSS v3 7.5
Vecteur d'attaque : distant (réseau) / non authentifié / sans interaction utilisateur
Surface d'attaque : ConcurrencyLimitedModel / limit_model_concurrency / max_concurrency / anyio.CapacityLimiter
Correctif : 2.53.0 — appliquer immédiatement
Plan : 1) Audit SBOM, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.
Une vulnérabilité (CWE-772) affecte pydantic-ai. Les attaquants atteignent le code vulnérable via ConcurrencyLimitedModel sans authentification.
Consultez l'avis de l'éditeur pour les versions affectées de pydantic-ai. Surface d'attaque : ConcurrencyLimitedModel / limit_model_concurrency / max_concurrency / anyio.CapacityLimiter.
Gravité : Élevée (CVSS 7.5/10). Risque d'opérations non autorisées ou de divulgation.
Mettre à jour vers 2.53.0.
En attendant le correctif : désactivez la fonctionnalité concernée, appliquez des règles WAF, ou restreignez l'accès par ACL réseau.
Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.
Actions de réponse
Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre
-
1Identify exposure identify
grep -r 'pydantic-ai' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
pydantic-aiを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade pydantic-ai to 2.53.0ステージング環境で 2.53.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Paquets affectés
Références
- advisory nvd.nist.gov
- advisory github.com
- package github.com
- package pypi.org
- package pypi.org
- web github.com
- web github.com
- web github.com
- web github.com