CVE-2026-133422

Source
https://cve.org/CVERecord?id=CVE-2026-133422
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-133422.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-133422
Aliases
  • GHSA-49g6-96jj-f7r9
Published
2026-11-20T07:33:35Z
Modified
2026-11-20T09:00:10Z
Severity
  • 6.9 (Medium) CVSS_V4 - 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 Calculator
Summary
Quadratic time unique_items list validation in Pydantic V1
Details

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.

Database specific
{
    "cna_assigner": "Pydantic",
    "cwe_ids": [
        "CWE-407"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/133xxx/CVE-2026-133422.json"
}
References

Affected packages

Git / github.com/pydantic/pydantic

Affected ranges

Type
GIT
Repo
https://github.com/pydantic/pydantic
Events
Database specific
Show details
{
    "extracted_events": [
        {
            "range": [
                {
                    "introduced": "1.9.0"
                },
                {
                    "last_affected": "1.10.26"
                }
            ],
            "source": "AFFECTED_FIELD",
            "strategy": "StandardRange"
        },
        {
            "range": [
                {
                    "fixed": "6ec75e57f277a820ec583e601167f25fe8dc7c87"
                }
            ],
            "source": "REFERENCES_COMMIT"
        },
        {
            "original_tag": "v2.14.2",
            "range": [
                {
                    "fixed": "aa540acc29960fb394312cf97d888c99f9686814"
                }
            ],
            "source": "REFERENCES_TAG"
        }
    ]
}

Affected versions

core-v2.*
core-v2.42.0
core-v2.43.0
core-v2.44.0
core-v2.45.0
core-v2.46.0
core-v2.48.0
core-v2.49.0
core-v2.50.0
core-v2.50.1
v1.*
v1.10.0
v1.10.0a1
v1.10.0a2
v1.10.0b1
v1.10.1
v1.10.10
v1.10.11
v1.10.12
v1.10.13
v1.10.14
v1.10.18
v1.10.19
v1.10.2
v1.10.20
v1.10.21
v1.10.22
v1.10.23
v1.10.24
v1.10.25
v1.10.26
v1.10.3
v1.10.4
v1.10.5
v1.10.6
v1.10.7
v1.10.8
v1.10.9
v1.10a1
v1.9.0
v2.*
v2.0
v2.0.1
v2.0.2
v2.0.3
v2.0a1
v2.0a2
v2.0a3
v2.0a4
v2.0b1
v2.0b2
v2.0b3
v2.1.0
v2.1.1
v2.10.0b1
v2.10.0b2
v2.11.0
v2.11.0a1
v2.11.0a2
v2.11.0b1
v2.11.0b2
v2.11.1
v2.11.2
v2.11.3
v2.12.0
v2.12.0a1
v2.12.0b1
v2.13.0
v2.13.0b1
v2.13.0b2
v2.13.0b3
v2.14.0
v2.14.0a1
v2.14.0b1
v2.14.0b2
v2.14.1
v2.2.0
v2.2.1
v2.2.2
v2.3.0
v2.4.0
v2.4.1
v2.4.2
v2.5.0
v2.5.0b1
v2.6.0b1
v2.7.0
v2.7.0b1
v2.7.1
v2.8.0
v2.8.0b1
v2.9.0
v2.9.0b1
v2.9.0b2

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-133422.json"