p PatchFirst

PatchFirst · Latest vulnerabilities

pydantic vulnerabilities

Vulnerabilities published for pydantic in the last 30 days: 7. Listed in the KEV catalogue: 0.

Filter vulnerabilities
Clear filters

Vulnerabilities: 9

  1. CVE-2026-133421

    Medium · CVSS 6.9EPSS 0.52%Fix available

    Quadratic time timedelta validation in Pydantic V1

    Validating an untrusted ISO 8601 duration string into a timedelta field with Pydantic V1 takes quadratic time: an input of a few dozen kilobytes takes seconds to validate. The iso8601_duration_re regular expression used to parse ISO 8601 durations (in pydantic/datetime_parse.py) contains an unescaped ".", which also matches digits. On a string of digits, the repeated groups overlap and the regex engine backtracks in quadratic time. The issue was fixed in commit 62791e66a9f8f118e465ed760c9e2ede9ae3055e. Users relying on the pydantic.v1 namespace in Pydantic V2 should upgrade to 2.14.2 or later. Impact: denial of service through validation o

    • Update to 2.4.2-1
    Published Updated
  2. CVE-2026-133422

    Medium · CVSS 6.9EPSS 0.52%Fix available

    Quadratic time unique_items list validation in Pydantic V1

    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. Affect

    • Update to 2.4.2-1
    Published Updated
  3. CVE-2026-133424

    Medium · CVSS 6.3EPSS 0.55%No fix published

    Validation bypass of aliased fields in TypedDict and dataclasses allowing extra data

    When extra data is allowed, providing both the alias and the name of an aliased TypedDict or dataclass field makes the unvalidated value (provided under the name) overwrite the validated one (provided under the alias), resulting in validated data not matching the declared type. Extra items are stored in the same dictionary as the fields (the returned dictionary for TypedDict, the instance __dict__ for dataclasses). As only the alias is marked as used, the field name is treated as an extra item, and its unvalidated value overrides the validated one. The TypedDict validator (pydantic-core/src/validators/typed_dict.rs) and the dataclass validat

    Published Updated
  4. CVE-2026-133426

    Medium · CVSS 6.3EPSS 0.51%Fix available

    Unbounded exponent in Fraction validation

    Validating an untrusted string in exponent notation into a Fraction field computes the full power of ten without any bound: an input of a few bytes takes seconds to validate. String inputs are passed to the Fraction constructor. For strings in exponent notation (e.g. '1e8000000'), CPython computes the corresponding power of ten as an integer (in Lib/fractions.py). The issue was fixed in commit 69ed168e9ad465eef4c8d81efb152a93b604daf5. For strings in exponent notation, the exponent is now parsed before calling the Fraction constructor, and exponents larger than 4300 (in absolute value) are rejected. Impact: denial of service through validat

    • Update to 2.14.0-1
    Published Updated
  5. CVE-2026-133428

    Medium · CVSS 6.3EPSS 0.52%Fix available

    Quadratic time and memory multi-host URL validation

    Validating an untrusted URL with a long scheme and many hosts into a multi-host URL field (e.g. PostgresDsn) takes quadratic time and memory: an input of about a hundred kilobytes takes around a gigabyte of memory to validate. The parse_multihost_url() function (in pydantic-core/src/validators/url.rs) parses each host separately, prepending the whole URL prefix (including the scheme) to every one of them. As the scheme can be arbitrarily long, and is parsed and stored once per host, both time and memory grow quadratically with the input size. Allowed schemes (e.g. postgres for PostgresDsn) are only checked after parsing, so they don't preven

    • Update to 2.14.0-1
    Published Updated
  6. CVE-2026-133429

    Medium · CVSS 6.3EPSS 0.55%No fix published

    Validation bypass of extra data keys in JSON model validation

    When validating JSON data into a model allowing extra data, the keys of extra data aren't validated against the key type annotated on __pydantic_extra__, resulting in extra data not matching the declared type. This is the case if you define __pydantic_extra__ as e.g. dict[Annotated[str, Field(pattern=r'^x_')], int]. The validate_json_by_iteration() method (in pydantic-core/src/validators/model_fields.rs), used to validate JSON data into models, only validates the values of extra data, and stores the keys as is. The issue was fixed in commit 4c65dbda9970a488e2ff21c8693fc6f6d70a3358. Impact: validation bypass, as extra data returned by valid

    Published Updated
  7. CVE-2026-133276

    Medium · CVSS 6.3EPSS 0.52%Fix available

    Validation bypass of Pydantic V1 dataclasses allowing extra data

    When extra data is allowed (extra=Extra.allow), providing a __pydantic_initialised__ key when validating a Pydantic V1 dataclass makes it considered as already validated, resulting in field values not being validated. The __init__() method of Pydantic V1 dataclasses stores all the provided keyword arguments in the instance __dict__ before validation, so a __pydantic_initialised__ keyword argument overrides the internal flag used to skip validation of already validated instances. As a result, data returned by validation doesn't match the declared type. Affected are applications validating untrusted data into Pydantic V1 dataclasses allowing ex

    • Update to 2.4.2-1
    Published Updated
  8. CVE-2021-29510

    Low · CVSS 3.3EPSS 0.97%Fix available

    Use of "infinity" as an input to datetime and date fields causes infinite loop in pydantic

    Pydantic is a data validation and settings management using Python type hinting. In affected versions passing either `'infinity'`, `'inf'` or `float('inf')` (or their negatives) to `datetime` or `date` fields causes validation to run forever with 100% CPU usage (on one CPU). Pydantic has been patched with fixes available in the following versions: v1.8.2, v1.7.4, v1.6.2. All these versions are available on pypi(https://pypi.org/project/pydantic/#history), and will be available on conda-forge(https://anaconda.org/conda-forge/pydantic) soon. See the changelog(https://pydantic-docs.helpmanual.io/) for details. If you absolutely can't upgrade, yo

    • Update to 1.7.4-1
    Published Updated

Check your server

Check your installed stack and versions against the current vulnerability feeds.

Check your server →