SSRF (Falsification de requête côté serveur) dans pydantic-ai-slim (CVE-2026-54249)
Résumé
SSRF dans pydantic-ai-slim (CVE-2026-54249). Des informations confidentielles peuvent être exposées. Exploitable via UploadedFile. Atténuation : mise à jour vers 2.0.0b6 ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
Summary
A client that can submit message history to a Pydantic AI UI adapter can reference arbitrary files in the application's model-provider or cloud-storage account. The server forwards the reference to the model provider, which fetches it using the server's own credentials, allowing the client to read files it should not have access to.
Details
UI adapters reconstruct file parts from client-submitted message history and forward them to the model provider. File URL parts are validated against a scheme allowlist before being forwarded, but UploadedFile references — which point to a file by provider file ID or cloud-storage URI (e.g. s3://…, gs://…) — were forwarded without validation.
Because the provider resolves an UploadedFile using the server-side identity (IAM role, service account, or provider API key) rather than the client's, a client that crafts message history containing an attacker-chosen UploadedFile can cause the server to read objects belonging to its own account or to other tenants, given a referenceable identifier.
Impact
Applications that pass untrusted client-submitted message history to an agent through a UI adapter (such as the Vercel AI adapter). Exploitation requires the attacker to reference a valid file identifier; depending on how the application names objects, such identifiers are not always unguessable.
Patches
Upgrade to 1.106.0 (1.x) or 2.0.0b6 (the 2.x beta line), which validate UploadedFile reference…
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-54249 a été découverte dans pydantic-ai-slim.
Des attaquants peuvent cibler un point d'entrée spécifique comme UploadedFile à distance pour détourner le produit.
Des informations confidentielles peuvent être exposées. Score CVSS : 6.8/10.
Action : mettez à jour pydantic-ai-slim vers 2.0.0b6 ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « pydantic-ai-slim CVE-2026-54249 » sur le site de l'éditeur.
CVE-2026-54249 (pydantic-ai-slim) — CWE-918 / CVSS v3 6.8
Vecteur d'attaque : distant (réseau) / non authentifié / sans interaction utilisateur
Surface d'attaque : UploadedFile
Correctif : 2.0.0b6 — appliquer immédiatement
Contournement : If users cannot upgrade, do not pass untrusted client-submitted message history to the agent, or strip UploadedFile parts from incoming messages before running the agent.
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 SSRF (CWE-918) affecte pydantic-ai-slim. Les attaquants atteignent le code vulnérable via UploadedFile sans authentification.
Consultez l'avis de l'éditeur pour les versions affectées de pydantic-ai-slim. Surface d'attaque : UploadedFile.
Gravité : Moyenne (CVSS 6.8/10). Des informations confidentielles peuvent être exposées.
Mettre à jour vers 2.0.0b6.
Contournement : If users cannot upgrade, do not pass untrusted client-submitted message history to the agent, or strip UploadedFile parts from incoming messages before running the agent.
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-slim' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
pydantic-ai-slimを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply temporary workaround mitigate
If users cannot upgrade, do not pass untrusted client-submitted message history to the agent, or strip `UploadedFile` parts from incoming messages before running the agent.パッチが適用されるまでの応急処置として、If users cannot upgrade, do not pass untrusted client-submitted message history to the agent, or strip
UploadedFileparts from incoming messages before running the agent. を実施。回避策の副作用 (機能低下) を確認した上で。 -
3Apply patch patch
Upgrade pydantic-ai-slim to 2.0.0b6ステージング環境で 2.0.0b6 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
4Post-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