1. Accueil
  2. Vulnérabilités
  3. CVE-2026-133422

CVE-2026-133422

Quadratic time unique_items list validation in Pydantic V1

Publiée le 20 nov. 2026 · modifiée le 23 nov. 2026 · Sources : NVD, CNA (éditeur ou attributeur), EPSS (FIRST)

Moyen 43/100

Résumé

Validating an untrusted list into a field constrained with unique_items=True with Pydantic V1 takes quadratic time: an input of a few hundred kilobytes takes seconds to validate. The ConstrainedList.unique_items_validator validator (in pydantic/types.py) checks each item against all the following ones. For a list with no duplicates (the common, valid case), this results in a quadratic number of comparisons. The issue was fixed in commit 6ec75e57f277a820ec583e601167f25fe8dc7c87. Users relying on the pydantic.v1 namespace in Pydantic V2 should upgrade to 2.14.2 or later. Impact: denial of service through validation of untrusted input. Affected are applications validating untrusted lists into fields constrained with unique_items=True (using conlist() or Field()). The fix only applies to lists of builtin scalar types (int, float, str, bytes, bool and None), for which duplicates can be detected in linear time. Lists of other types (e.g. models or dictionaries) are still checked in quadratic time, as their items aren't guaranteed to be hashable: bound their size using the max_items constraint. Pydantic V2 models are not affected.

Aucune traduction française : description d’origine affichée.

Produits et versions affectés

Pydantic (1 ligne(s))
Pydantic
ProduitVersionsCorrigé dansSource
Pydantic de 1.9.0 (inclus) à 1.10.26 (inclus) — CNA (éditeur ou attributeur)

Correctif

Non renseigné par l’éditeur.

Contournement

Aucun contournement renseigné.

Savoir si vous êtes touché

Aucune méthode de vérification renseignée.

Chronologie

  1. — Publication de la CVE (cve)

Références

Provenance des données

Statut
NVD
Date de publication
NVD
Description
CNA (éditeur ou attributeur)
Score CVSS
CNA (éditeur ou attributeur)
Faiblesse (CWE)
CNA (éditeur ou attributeur)
Vecteur CVSS
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N (CVSS 4.0, CNA:Pydantic)
Faiblesse
CWE-407 · Autre (CWE-407)

Comment sont obtenues et calculées ces données