CVE-2021-29510

Source
https://nvd.nist.gov/vuln/detail/CVE-2021-29510
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2021-29510.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-29510
Aliases
Related
Published
2021-05-13T19:15:08Z
Modified
2024-10-12T07:13:59.536788Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
[none]
Details

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.

References

Affected packages

Debian:11 / pydantic

Package

Name
pydantic
Purl
pkg:deb/debian/pydantic?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.7.4-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:12 / pydantic

Package

Name
pydantic
Purl
pkg:deb/debian/pydantic?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.7.4-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:13 / pydantic

Package

Name
pydantic
Purl
pkg:deb/debian/pydantic?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.7.4-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Git / github.com/pydantic/pydantic

Affected ranges

Type
GIT
Repo
https://github.com/pydantic/pydantic
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Type
GIT
Repo
https://github.com/samuelcolvin/pydantic
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

V0.*

V0.17

v0.*

v0.0.2
v0.0.3
v0.0.4
v0.0.5
v0.0.6
v0.0.7
v0.0.8
v0.1
v0.10
v0.11
v0.11.1
v0.11.2
v0.12
v0.12.1
v0.13
v0.13.1
v0.14
v0.15
v0.16
v0.16.1
v0.18
v0.18.1
v0.18.2
v0.19
v0.2
v0.2.1
v0.20
v0.20.1
v0.20a1
v0.21
v0.22
v0.23
v0.24
v0.25
v0.26
v0.27
v0.28
v0.29
v0.3
v0.30
v0.30.1
v0.31
v0.31.1
v0.32
v0.4
v0.5
v0.6
v0.6.1
v0.6.2
v0.6.3
v0.6.4
v0.7
v0.7.1
v0.8
v0.9
v0.9.1

v1.*

v1.0
v1.0b1
v1.0b2
v1.1
v1.2
v1.3
v1.4
v1.5
v1.5.1
v1.6
v1.6.1
v1.7
v1.7.1
v1.7.2
v1.8
v1.8.1