Vulnerability Name:

CVE-2021-29510 (CCN-201811)

Assigned:2021-05-11
Published:2021-05-11
Updated:2021-05-25
Summary: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, you can work around this risk using a validator(https://pydantic-docs.helpmanual.io/usage/validators/) to catch these values. This is not an ideal solution (in particular you'll need a slightly different function for datetimes), instead of a hack like this you should upgrade pydantic. If you are not using v1.8.x, v1.7.x or v1.6.x and are unable to upgrade to a fixed version of pydantic, please create an issue at https://github.com/samuelcolvin/pydantic/issues requesting a back-port, and we will endeavour to release a patch for earlier versions of pydantic.
CVSS v3 Severity:7.5 High (CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)
6.5 Medium (Temporal CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:U/RL:O/RC:C)
Exploitability Metrics:Attack Vector (AV): Network
Attack Complexity (AC): Low
Privileges Required (PR): None
User Interaction (UI): None
Scope:Scope (S): Unchanged
Impact Metrics:Confidentiality (C): None
Integrity (I): None
Availibility (A): High
7.5 High (CCN CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)
6.5 Medium (CCN Temporal CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:U/RL:O/RC:C)
Exploitability Metrics:Attack Vector (AV): Network
Attack Complexity (AC): Low
Privileges Required (PR): None
User Interaction (UI): None
Scope:Scope (S): Unchanged
Impact Metrics:Confidentiality (C): None
Integrity (I): None
Availibility (A): High
CVSS v2 Severity:5.0 Medium (CVSS v2 Vector: AV:N/AC:L/Au:N/C:N/I:N/A:P)
Exploitability Metrics:Access Vector (AV): Network
Access Complexity (AC): Low
Authentication (Au): None
Impact Metrics:Confidentiality (C): None
Integrity (I): None
Availibility (A): Partial
7.8 High (CCN CVSS v2 Vector: AV:N/AC:L/Au:N/C:N/I:N/A:C)
Exploitability Metrics:Access Vector (AV): Network
Access Complexity (AC): Low
Athentication (Au): None
Impact Metrics:Confidentiality (C): None
Integrity (I): None
Availibility (A): Complete
Vulnerability Type:CWE-835
Vulnerability Consequences:Denial of Service
References:Source: MITRE
Type: CNA
CVE-2021-29510

Source: XF
Type: UNKNOWN
pydantic-cve202129510-dos(201811)

Source: MISC
Type: Patch, Third Party Advisory
https://github.com/samuelcolvin/pydantic/commit/7e83fdd2563ffac081db7ecdf1affa65ef38c468

Source: CCN
Type: Pydantic GIT Repository
Use of infinity as an input to datetime and date fields causes infinite loop

Source: CONFIRM
Type: Mitigation, Patch, Third Party Advisory
https://github.com/samuelcolvin/pydantic/security/advisories/GHSA-5jqp-qgf6-3pvh

Source: FEDORA
Type: Mailing List, Third Party Advisory
FEDORA-2021-4d3de3183f

Source: FEDORA
Type: Mailing List, Third Party Advisory
FEDORA-2021-e7fabd81fb

Source: FEDORA
Type: Mailing List, Third Party Advisory
FEDORA-2021-f8bb3ba3ec

Vulnerable Configuration:Configuration 1:
  • cpe:/a:pydantic_project:pydantic:*:*:*:*:*:*:*:* (Version < 1.6.2)
  • OR cpe:/a:pydantic_project:pydantic:*:*:*:*:*:*:*:* (Version >= 1.7 and < 1.7.4)
  • OR cpe:/a:pydantic_project:pydantic:*:*:*:*:*:*:*:* (Version >= 1.8 and < 1.8.2)

  • Configuration 2:
  • cpe:/o:fedoraproject:fedora:33:*:*:*:*:*:*:*
  • OR cpe:/o:fedoraproject:fedora:34:*:*:*:*:*:*:*

  • * Denotes that component is vulnerable
    Oval Definitions
    Definition IDClassTitleLast Modified
    oval:org.opensuse.security:def:113284
    P
    python36-pydantic-1.8.2-1.2 on GA media (Moderate)
    2022-01-17
    oval:org.opensuse.security:def:106696
    P
    python36-pydantic-1.8.2-1.2 on GA media (Moderate)
    2021-10-01
    BACK
    pydantic_project pydantic *
    pydantic_project pydantic *
    pydantic_project pydantic *
    fedoraproject fedora 33
    fedoraproject fedora 34