CVE-2021-29510
Published May 13, 2021
Last updated a year ago
Overview
- Description
- 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.
- Source
- security-advisories@github.com
- NVD status
- Modified
Social media
- Hype score
- Not currently trending
Risk scores
CVSS 3.1
- Type
- Primary
- Base score
- 7.5
- Impact score
- 3.6
- Exploitability score
- 3.9
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Severity
- HIGH
CVSS 2.0
- Type
- Primary
- Base score
- 5
- Impact score
- 2.9
- Exploitability score
- 10
- Vector string
- AV:N/AC:L/Au:N/C:N/I:N/A:P
Weaknesses
- security-advisories@github.com
- CWE-835
Configurations
[ { "nodes": [ { "negate": false, "cpeMatch": [ { "criteria": "cpe:2.3:a:pydantic_project:pydantic:*:*:*:*:*:*:*:*", "vulnerable": true, "matchCriteriaId": "5B14C2A2-9DE3-4E17-88DF-03489F3314CE", "versionEndExcluding": "1.6.2" }, { "criteria": "cpe:2.3:a:pydantic_project:pydantic:*:*:*:*:*:*:*:*", "vulnerable": true, "matchCriteriaId": "1D04FDD9-F777-45DD-A081-A7988FB7A185", "versionEndExcluding": "1.7.4", "versionStartIncluding": "1.7" }, { "criteria": "cpe:2.3:a:pydantic_project:pydantic:*:*:*:*:*:*:*:*", "vulnerable": true, "matchCriteriaId": "9EDF20F8-2F3F-46D6-943F-115BD3EBD260", "versionEndExcluding": "1.8.2", "versionStartIncluding": "1.8" } ], "operator": "OR" } ] }, { "nodes": [ { "negate": false, "cpeMatch": [ { "criteria": "cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*", "vulnerable": true, "matchCriteriaId": "E460AA51-FCDA-46B9-AE97-E6676AA5E194" }, { "criteria": "cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*", "vulnerable": true, "matchCriteriaId": "A930E247-0B43-43CB-98FF-6CE7B8189835" } ], "operator": "OR" } ] } ]