{"api_version":"1","generated_at":"2026-07-23T15:01:01+00:00","cve":"CVE-2021-29510","urls":{"html":"https://cve.report/CVE-2021-29510","api":"https://cve.report/api/cve/CVE-2021-29510.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2021-29510","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2021-29510"},"summary":{"title":"CVE-2021-29510","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.","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2021-05-13 19:15:00","updated_at":"2023-11-07 03:32:00"},"problem_types":["CWE-835"],"metrics":[],"references":[{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UEFWM7DYKD2ZHE7R5YT5EQWJPV4ZKYRB/","name":"FEDORA-2021-e7fabd81fb","refsource":"FEDORA","tags":[],"title":"[SECURITY] Fedora 34 Update: python-fastapi-0.65.1-2.fc34 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/S2HT266L6Q7H6ICP7DFGXOGBJHNNKMKB/","name":"FEDORA-2021-4d3de3183f","refsource":"FEDORA","tags":[],"title":"[SECURITY] Fedora 34 Update: python-pydantic-1.7.4-1.fc34 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/samuelcolvin/pydantic/security/advisories/GHSA-5jqp-qgf6-3pvh","name":"https://github.com/samuelcolvin/pydantic/security/advisories/GHSA-5jqp-qgf6-3pvh","refsource":"CONFIRM","tags":[],"title":"Use of \"infinity\" as an input to datetime and date fields causes infinite loop · Advisory · samuelcolvin/pydantic · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UMKAJX4O6IGBBCE32CO2G7PZQCCQSBLV/","name":"FEDORA-2021-f8bb3ba3ec","refsource":"","tags":[],"title":"[SECURITY] Fedora 33 Update: python-pydantic-1.6.2-1.fc33 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/samuelcolvin/pydantic/commit/7e83fdd2563ffac081db7ecdf1affa65ef38c468","name":"https://github.com/samuelcolvin/pydantic/commit/7e83fdd2563ffac081db7ecdf1affa65ef38c468","refsource":"MISC","tags":[],"title":"Merge pull request from GHSA-5jqp-qgf6-3pvh · samuelcolvin/pydantic@7e83fdd · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UEFWM7DYKD2ZHE7R5YT5EQWJPV4ZKYRB/","name":"FEDORA-2021-e7fabd81fb","refsource":"","tags":[],"title":"[SECURITY] Fedora 34 Update: python-fastapi-0.65.1-2.fc34 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/S2HT266L6Q7H6ICP7DFGXOGBJHNNKMKB/","name":"FEDORA-2021-4d3de3183f","refsource":"","tags":[],"title":"[SECURITY] Fedora 34 Update: python-pydantic-1.7.4-1.fc34 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UMKAJX4O6IGBBCE32CO2G7PZQCCQSBLV/","name":"FEDORA-2021-f8bb3ba3ec","refsource":"FEDORA","tags":[],"title":"[SECURITY] Fedora 33 Update: python-pydantic-1.6.2-1.fc33 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2021-29510","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-29510","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2021","cve_id":"29510","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"fedoraproject","cpe5":"fedora","cpe6":"33","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2021","cve_id":"29510","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"fedoraproject","cpe5":"fedora","cpe6":"34","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2021","cve_id":"29510","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"pydantic_project","cpe5":"pydantic","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2021-29510","qid":"179985","title":"Debian Security Update for pydantic (CVE-2021-29510)"},{"cve":"CVE-2021-29510","qid":"200004","title":"Ubuntu Security Notification for Pydantic Vulnerability (USN-6553-1)"},{"cve":"CVE-2021-29510","qid":"281154","title":"Fedora Security Update for python (FEDORA-2021-e7fabd81fb)"},{"cve":"CVE-2021-29510","qid":"281161","title":"Fedora Security Update for python (FEDORA-2021-f8bb3ba3ec)"},{"cve":"CVE-2021-29510","qid":"281162","title":"Fedora Security Update for python (FEDORA-2021-4d3de3183f)"},{"cve":"CVE-2021-29510","qid":"980630","title":"Python (pip) Security Update for pydantic (GHSA-5jqp-qgf6-3pvh)"}]},"source_records":{"cve_program":{"CVE_data_meta":{"ASSIGNER":"security-advisories@github.com","ID":"CVE-2021-29510","STATE":"PUBLIC","TITLE":"Use of \"infinity\" as an input to datetime and date fields causes infinite loop in pydantic"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"pydantic","version":{"version_data":[{"version_value":">= 1.8.0, < 1.8.2"},{"version_value":">= 1.7.0, < 1.7.4"},{"version_value":"< 1.6.2"}]}}]},"vendor_name":"samuelcolvin"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"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."}]},"impact":{"cvss":{"attackComplexity":"LOW","attackVector":"LOCAL","availabilityImpact":"LOW","baseScore":3.3,"baseSeverity":"LOW","confidentialityImpact":"NONE","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L","version":"3.1"}},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')"}]}]},"references":{"reference_data":[{"name":"https://github.com/samuelcolvin/pydantic/security/advisories/GHSA-5jqp-qgf6-3pvh","refsource":"CONFIRM","url":"https://github.com/samuelcolvin/pydantic/security/advisories/GHSA-5jqp-qgf6-3pvh"},{"name":"https://github.com/samuelcolvin/pydantic/commit/7e83fdd2563ffac081db7ecdf1affa65ef38c468","refsource":"MISC","url":"https://github.com/samuelcolvin/pydantic/commit/7e83fdd2563ffac081db7ecdf1affa65ef38c468"},{"refsource":"FEDORA","name":"FEDORA-2021-f8bb3ba3ec","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UMKAJX4O6IGBBCE32CO2G7PZQCCQSBLV/"},{"refsource":"FEDORA","name":"FEDORA-2021-4d3de3183f","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/S2HT266L6Q7H6ICP7DFGXOGBJHNNKMKB/"},{"refsource":"FEDORA","name":"FEDORA-2021-e7fabd81fb","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UEFWM7DYKD2ZHE7R5YT5EQWJPV4ZKYRB/"}]},"source":{"advisory":"GHSA-5jqp-qgf6-3pvh","discovery":"UNKNOWN"}},"nvd":{"publishedDate":"2021-05-13 19:15:00","lastModifiedDate":"2023-11-07 03:32:00","problem_types":["CWE-835"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH","baseScore":7.5,"baseSeverity":"HIGH"},"exploitabilityScore":3.9,"impactScore":3.6},"baseMetricV2":{"cvssV2":{"version":"2.0","vectorString":"AV:N/AC:L/Au:N/C:N/I:N/A:P","accessVector":"NETWORK","accessComplexity":"LOW","authentication":"NONE","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"PARTIAL","baseScore":5},"severity":"MEDIUM","exploitabilityScore":10,"impactScore":2.9,"acInsufInfo":false,"obtainAllPrivilege":false,"obtainUserPrivilege":false,"obtainOtherPrivilege":false,"userInteractionRequired":false}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:pydantic_project:pydantic:*:*:*:*:*:*:*:*","versionStartIncluding":"1.8","versionEndExcluding":"1.8.2","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:pydantic_project:pydantic:*:*:*:*:*:*:*:*","versionStartIncluding":"1.7","versionEndExcluding":"1.7.4","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:pydantic_project:pydantic:*:*:*:*:*:*:*:*","versionEndExcluding":"1.6.2","cpe_name":[]}]},{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*","cpe_name":[]}]}]}},"legacy_mitre":{"record":{"CveYear":"2021","CveId":"29510","Ordinal":"204714","Title":"CVE-2021-29510","CVE":"CVE-2021-29510","Year":"2021"},"notes":[{"CveYear":"2021","CveId":"29510","Ordinal":"1","NoteData":"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.","Type":"Description","Title":null},{"CveYear":"2021","CveId":"29510","Ordinal":"2","NoteData":"2021-05-13","Type":"Other","Title":"Published"},{"CveYear":"2021","CveId":"29510","Ordinal":"3","NoteData":"2021-05-22","Type":"Other","Title":"Modified"}]}}}