Unchecked Input for Loop Condition Affecting python3.12-pydantic package, versions *


Severity

Recommended
0.0
medium
0
10

Based on Red Hat Enterprise Linux security rating.

Threat Intelligence

EPSS
0.82% (59th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-RHEL7-PYTHON312PYDANTIC-22772994
  • published23 Nov 2026
  • disclosed20 Nov 2026

Introduced: 20 Nov 2026

NewCVE-2026-133422  (opens in a new tab)
CWE-606  (opens in a new tab)

How to fix?

There is no fixed version for RHEL:7 python3.12-pydantic.

NVD Description

Note: Versions mentioned in the description apply only to the upstream python3.12-pydantic package and not the python3.12-pydantic package as distributed by RHEL. See How to fix? for RHEL:7 relevant fixed versions and status.

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.

CVSS Base Scores

version 3.1