CVE-2021-29510
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, 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.
Exposure status: unknown. This page does not establish whether an installed system is affected or corrected.
Severity and exploitation evidence
EPSS: 0.975% · score date 2026-11-19. EPSS is an estimated probability over the next 30 days, not proof of exploitation.
CISA KEV: not included in the checked catalog; exploitation may still occur. Last checked: 2026-11-19T20:18:55.078Z. Public exploit availability is not used to set this status.
CVSS 3.1 · 3.3 · published by GitHub_MCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L
Assessment source · checked 2026-11-19T19:04:44.838Z
Verification by field
| Field | Status | Checked at (UTC) | Source |
|---|---|---|---|
| kev | verified | 2026-11-19T20:18:55.078Z | CISA KEV |
| cvss | verified | 2026-11-19T19:04:44.838Z | CVE Program |
| epss | verified | 2026-11-19T20:07:50.665Z | FIRST EPSS |
| patches | verified | 2026-11-19T19:03:40.577Z | OSV |
| affected | verified | 2026-11-19T19:04:44.838Z | CVE Program |
| lifecycle | verified | 2026-11-19T19:04:44.838Z | CVE Program |
Affected versions and configuration
samuelcolvin pydantic; default status: unknown: >= 1.8.0, < 1.8.2 [affected; scheme: unspecified]; >= 1.7.0, < 1.7.4 [affected; scheme: unspecified]; < 1.6.2 [affected; scheme: unspecified]
Defaults, conditional configuration, package status and version schemes are retained below. A version range alone is not an exposure verdict.
CVE Program · cve-json · full conditions
{
"affected": [
{
"vendor": "samuelcolvin",
"product": "pydantic",
"versions": [
{
"status": "affected",
"version": ">= 1.8.0, < 1.8.2"
},
{
"status": "affected",
"version": ">= 1.7.0, < 1.7.4"
},
{
"status": "affected",
"version": "< 1.6.2"
}
]
}
],
"additionalContainers": [
{
"title": "CVE Program Container",
"references": [
{
"url": "https://github.com/samuelcolvin/pydantic/security/advisories/GHSA-5jqp-qgf6-3pvh",
"tags": [
"x_refsource_CONFIRM",
"x_transferred"
]
},
{
"url": "https://github.com/samuelcolvin/pydantic/commit/7e83fdd2563ffac081db7ecdf1affa65ef38c468",
"tags": [
"x_refsource_MISC",
"x_transferred"
]
},
{
"url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UMKAJX4O6IGBBCE32CO2G7PZQCCQSBLV/",
"name": "FEDORA-2021-f8bb3ba3ec",
"tags": [
"vendor-advisory",
"x_refsource_FEDORA",
"x_transferred"
]
},
{
"url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/S2HT266L6Q7H6ICP7DFGXOGBJHNNKMKB/",
"name": "FEDORA-2021-4d3de3183f",
"tags": [
"vendor-advisory",
"x_refsource_FEDORA",
"x_transferred"
]
},
{
"url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UEFWM7DYKD2ZHE7R5YT5EQWJPV4ZKYRB/",
"name": "FEDORA-2021-e7fabd81fb",
"tags": [
"vendor-advisory",
"x_refsource_FEDORA",
"x_transferred"
]
}
],
"providerMetadata": {
"orgId": "af854a3a-2127-422b-91ae-364da2661108",
"shortName": "CVE",
"dateUpdated": "2024-08-03T22:11:05.442Z"
}
}
]
}Archived source JSONOSV · osv · full conditions
{
"id": "GHSA-5jqp-qgf6-3pvh",
"aliases": [
"CVE-2021-29510",
"PYSEC-2021-47"
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "1.6.2"
}
]
}
],
"package": {
"name": "pydantic",
"purl": "pkg:pypi/pydantic",
"ecosystem": "PyPI"
},
"versions": [
"0.0.1",
"0.0.2",
"0.0.3",
"0.0.4",
"0.0.5",
"0.0.6",
"0.0.7",
"0.0.8",
"0.1",
"0.10",
"0.11",
"0.11.1",
"0.11.2",
"0.12",
"0.12.1",
"0.13",
"0.13.1",
"0.14",
"0.15",
"0.16",
"0.16.1",
"0.17",
"0.18",
"0.18.1",
"0.18.2",
"0.19",
"0.2",
"0.2.1",
"0.20",
"0.20.1",
"0.20a1",
"0.21",
"0.22",
"0.23",
"0.24",
"0.25",
"0.26",
"0.27",
"0.27a1",
"0.28",
"0.29",
"0.3",
"0.30",
"0.30.1",
"0.31",
"0.31.1",
"0.32",
"0.32.1",
"0.32.2",
"0.4",
"0.5",
"0.6",
"0.6.1",
"0.6.2",
"0.6.3",
"0.6.4",
"0.7",
"0.7.1",
"0.8",
"0.9",
"0.9.1",
"1.0",
"1.0b1",
"1.0b2",
"1.1",
"1.1.1",
"1.2",
"1.3",
"1.4",
"1.5",
"1.5.1",
"1.6",
"1.6.1"
],
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/05/GHSA-5jqp-qgf6-3pvh/GHSA-5jqp-qgf6-3pvh.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "1.8"
},
{
"fixed": "1.8.2"
}
]
}
],
"package": {
"name": "pydantic",
"purl": "pkg:pypi/pydantic",
"ecosystem": "PyPI"
},
"versions": [
"1.8",
"1.8.1"
],
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/05/GHSA-5jqp-qgf6-3pvh/GHSA-5jqp-qgf6-3pvh.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "1.7"
},
{
"fixed": "1.7.4"
}
]
}
],
"package": {
"name": "pydantic",
"purl": "pkg:pypi/pydantic",
"ecosystem": "PyPI"
},
"versions": [
"1.7",
"1.7.1",
"1.7.2",
"1.7.3"
],
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/05/GHSA-5jqp-qgf6-3pvh/GHSA-5jqp-qgf6-3pvh.json"
}
}
],
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L"
},
{
"type": "CVSS_V4",
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
}
],
"upstream": [],
"withdrawn": null,
"references": [
{
"url": "https://github.com/samuelcolvin/pydantic/security/advisories/GHSA-5jqp-qgf6-3pvh",
"type": "WEB"
},
{
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-29510",
"type": "ADVISORY"
},
{
"url": "https://github.com/pydantic/pydantic/commit/1c24f1d74ba95ea985b50bdc001ce96c813229aa",
"type": "WEB"
},
{
"url": "https://github.com/pydantic/pydantic/commit/80e0dd3f752bef145dce12f160d262bb40ec8d47",
"type": "WEB"
},
{
"url": "https://github.com/pydantic/pydantic/commit/bdde15b7b947c94ca00fd6eb92da8db390a13520",
"type": "WEB"
},
{
"url": "https://github.com/samuelcolvin/pydantic/commit/7e83fdd2563ffac081db7ecdf1affa65ef38c468",
"type": "WEB"
},
{
"url": "https://github.com/pydantic/pydantic",
"type": "PACKAGE"
},
{
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/pydantic/PYSEC-2021-47.yaml",
"type": "WEB"
},
{
"url": "https://lists.fedoraproject.org/archives/list/[email protected]/message/S2HT266L6Q7H6ICP7DFGXOGBJHNNKMKB",
"type": "WEB"
},
{
"url": "https://lists.fedoraproject.org/archives/list/[email protected]/message/UEFWM7DYKD2ZHE7R5YT5EQWJPV4ZKYRB",
"type": "WEB"
},
{
"url": "https://lists.fedoraproject.org/archives/list/[email protected]/message/UMKAJX4O6IGBBCE32CO2G7PZQCCQSBLV",
"type": "WEB"
}
],
"relatedGitRanges": [],
"database_specific": {
"cwe_ids": [
"CWE-835"
],
"severity": "MODERATE",
"github_reviewed": true,
"nvd_published_at": "2021-05-13T19:15:00Z",
"github_reviewed_at": "2021-05-13T18:54:35Z"
}
}Archived source JSONOSV · osv · full conditions
{
"id": "PYSEC-2021-47",
"aliases": [
"CVE-2021-29510",
"GHSA-5jqp-qgf6-3pvh"
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/samuelcolvin/pydantic",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "7e83fdd2563ffac081db7ecdf1affa65ef38c468"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "1.6.2"
},
{
"introduced": "1.7"
},
{
"fixed": "1.7.4"
},
{
"introduced": "1.8"
},
{
"fixed": "1.8.2"
}
]
}
],
"package": {
"name": "pydantic",
"purl": "pkg:pypi/pydantic",
"ecosystem": "PyPI"
},
"versions": [
"0.0.1",
"0.0.2",
"0.0.3",
"0.0.4",
"0.0.5",
"0.0.6",
"0.0.7",
"0.0.8",
"0.1",
"0.10",
"0.11",
"0.11.1",
"0.11.2",
"0.12",
"0.12.1",
"0.13",
"0.13.1",
"0.14",
"0.15",
"0.16",
"0.16.1",
"0.17",
"0.18",
"0.18.1",
"0.18.2",
"0.19",
"0.2",
"0.2.1",
"0.20",
"0.20.1",
"0.20a1",
"0.21",
"0.22",
"0.23",
"0.24",
"0.25",
"0.26",
"0.27",
"0.27a1",
"0.28",
"0.29",
"0.3",
"0.30",
"0.30.1",
"0.31",
"0.31.1",
"0.32",
"0.32.1",
"0.32.2",
"0.4",
"0.5",
"0.6",
"0.6.1",
"0.6.2",
"0.6.3",
"0.6.4",
"0.7",
"0.7.1",
"0.8",
"0.9",
"0.9.1",
"1.0",
"1.0b1",
"1.0b2",
"1.1",
"1.1.1",
"1.2",
"1.3",
"1.4",
"1.5",
"1.5.1",
"1.6",
"1.6.1",
"1.7",
"1.7.1",
"1.7.2",
"1.7.3",
"1.8",
"1.8.1",
"v1.6.1",
"v1.8.1",
"v1.8",
"v1.7.2",
"v1.7.1",
"v1.7",
"v1.6",
"v1.5.1",
"v1.5",
"v1.4",
"v1.3",
"v1.2",
"v1.1",
"v1.0",
"v1.0b2",
"v1.0b1",
"v0.32",
"v0.31.1",
"v0.31",
"v0.30.1",
"v0.30",
"v0.29",
"v0.28",
"v0.27",
"v0.26",
"v0.25",
"v0.24",
"v0.23",
"v0.22",
"v0.21",
"v0.20.1",
"v0.20",
"v0.20a1",
"v0.19",
"v0.18.2",
"v0.18.1",
"v0.18",
"V0.17",
"v0.16.1",
"v0.16",
"v0.15",
"v0.14",
"v0.13.1",
"v0.13",
"v0.12.1",
"v0.12",
"v0.11.2",
"v0.11.1",
"v0.11",
"v0.10",
"v0.9.1",
"v0.9",
"v0.8",
"v0.7.1",
"v0.7",
"v0.6.4",
"v0.6.3",
"v0.6.2",
"v0.6.1",
"v0.6",
"v0.5",
"v0.4",
"v0.3",
"v0.2.1",
"v0.2",
"v0.1",
"v0.0.8",
"v0.0.7",
"v0.0.6",
"v0.0.5",
"v0.0.4",
"v0.0.3",
"v0.0.2"
],
"database_specific": {
"source": "https://github.com/pypa/advisory-database/blob/main/vulns/pydantic/PYSEC-2021-47.yaml"
}
}
],
"severity": [],
"upstream": [],
"withdrawn": null,
"references": [
{
"url": "https://github.com/samuelcolvin/pydantic/security/advisories/GHSA-5jqp-qgf6-3pvh",
"type": "ADVISORY"
},
{
"url": "https://github.com/samuelcolvin/pydantic/commit/7e83fdd2563ffac081db7ecdf1affa65ef38c468",
"type": "FIX"
}
],
"relatedGitRanges": [],
"database_specific": {}
}Archived source JSONCorrection evidence
Distribution packages and upstream releases are distinct. ESM channels may require the corresponding Ubuntu entitlement. Notes and branch ranges are not installable package versions. OSV fixed boundaries are ecosystem-specific version thresholds, not proof that a package is currently available or installed.
| Evidence type | Distribution / release | Package | Channel | Version or source note | Source |
|---|---|---|---|---|---|
| ecosystem-boundary | PyPI / package | pydantic | Not a distribution channel | 1.6.2 | Official record |
| ecosystem-boundary | PyPI / package | pydantic | Not a distribution channel | 1.8.2 | Official record |
| ecosystem-boundary | PyPI / package | pydantic | Not a distribution channel | 1.7.4 | Official record |
Vendor notices and operational guidance
No connected vendor notice is available for this record.
Original sources and dates
- CVE ProgramConsulted: 2026-11-19T19:04:44.838ZArchived source JSON
Source publication: 2021-05-13T18:55:11.000Z
Source modification: 2024-08-03T22:11:05.442ZDocument fingerprint
3c51d0fc110a1f7bdd660d6bb00ae0656a0f2e852dc2a6112c1ac0f8feed5d9f - FIRST EPSSConsulted: 2026-11-19T20:07:50.665ZArchived source JSON
Source publication: not supplied
Source modification: not suppliedDocument fingerprint
89daa4891b0dc25d7bb2cc3975d92e77d1491588f7c8250a1aeb146923829f72 - CISA KEVConsulted: 2026-11-19T20:18:55.078ZArchived source JSON
Source publication: not supplied
Source modification: 2026-11-18T19:17:41.0354ZDocument fingerprint
a35fdc67c7d9802988dcfc1d3ff1198da327948d1db122ab7692ac201055ac56 - OSVConsulted: 2026-11-19T19:03:40.577ZArchived source JSON
Source publication: 2021-05-13T20:23:17.000Z
Source modification: 2026-07-08T06:29:37.051ZDocument fingerprint
1c993f453e5acf8029f91620d1d66b99d1845b2ea94685b982167ed504dee7dd - OSVConsulted: 2026-11-19T19:03:40.577ZArchived source JSON
Source publication: 2021-05-13T19:15:00.000Z
Source modification: 2026-06-08T11:15:47.381ZDocument fingerprint
1c993f453e5acf8029f91620d1d66b99d1845b2ea94685b982167ed504dee7dd
Official status history
- UNKNOWN → PUBLISHED · · evidence