{"items":[{"id":"NVI-00018649","kind":"vulnerability","title":"Use of \"infinity\" as an input to datetime and date fields causes infinite loop in pydantic","revision":1,"unknowns":["Customer inventory, deployment, reachability and exploitation have not been inspected."],"lifecycle":"active","identifiers":["GHSA-5jqp-qgf6-3pvh","CVE-2021-29510"],"plain_summary":"GitHub lists this reviewed advisory for pydantic, pydantic, pydantic. Published version ranges and source prerequisites are shown below; this is not an inspection of a visitor’s application.","review_status":"source_listed","control_topics":[],"public_actions":[{"summary":"Identify the exact component and deployed version, examine the linked publisher’s conditions, and retain evidence of any mitigation.","source_ids":["sr-4b37fde72cd94db200add31f88805358"],"action_type":"investigate","limitations":"Confirm current vendor support, compatibility and deployment evidence. This report has not tested a fix in your system.","current_supported_target":null}],"schema_version":"1.1.0","source_metrics":[{"kind":"CVSS","as_of":"2026-06-09T13:01:02.000Z","value":"3.3 medium","meaning":"GitHub source severity; exploitability and local consequence require separate evidence.","source_id":"sr-4b37fde72cd94db200add31f88805358"}],"why_it_matters":"Published affected context helps an owner decide what evidence to gather. This report has not examined your application.","related_sources":[{"id":"sr-4b37fde72cd94db200add31f88805358","url":"https://github.com/advisories/GHSA-5jqp-qgf6-3pvh","basis":"vendor_advisory","notes":"GitHub Advisory Database; CC-BY-4.0. Each advisory links its original attribution. Null normalizes fields.","title":"GHSA-5jqp-qgf6-3pvh","publisher":"GitHub Advisory Database","observed_at":"2026-11-06T15:13:31.161Z"}],"affected_context":[{"certainty":"source_listed","source_ids":["sr-4b37fde72cd94db200add31f88805358"],"technology":"pydantic","known_exclusions":[],"conditions_summary":"Impact\n\nPassing 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).\nPatches\n\nPydantic is be patched with fixes available in the following versions:\n\n    v1.8.2\n    v1.7.4\n    v1.6.2\n\nAll these versions are available on pypi, and will be available on conda-forge soon.\n\nSee the changelog for details.\nWorkarounds\n\nIf you absolutely can't upgrade, you can work around this risk using a validator to catch these values, brief demo:\n\nfrom datetime import date\nfrom pydantic import BaseModel, validator\n\nclass DemoModel(BaseModel):\n    date_of_birth: date\n\n    @validator('date_of_birth', pre=True)\n    def skip_infinite_values(cls, v):\n        try:\n            seconds = float(v)\n        except (ValueError, TypeError):\n            return v\n        else:\n            if seconds == float('inf'):\n                return date.max\n            elif seconds == float('-inf'):\n                return date.min\n            else:\n                return seconds\n\nNote: 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 ","public_affected_ranges":["< 1.6.2"]},{"certainty":"source_listed","source_ids":["sr-4b37fde72cd94db200add31f88805358"],"technology":"pydantic","known_exclusions":[],"conditions_summary":"Impact\n\nPassing 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).\nPatches\n\nPydantic is be patched with fixes available in the following versions:\n\n    v1.8.2\n    v1.7.4\n    v1.6.2\n\nAll these versions are available on pypi, and will be available on conda-forge soon.\n\nSee the changelog for details.\nWorkarounds\n\nIf you absolutely can't upgrade, you can work around this risk using a validator to catch these values, brief demo:\n\nfrom datetime import date\nfrom pydantic import BaseModel, validator\n\nclass DemoModel(BaseModel):\n    date_of_birth: date\n\n    @validator('date_of_birth', pre=True)\n    def skip_infinite_values(cls, v):\n        try:\n            seconds = float(v)\n        except (ValueError, TypeError):\n            return v\n        else:\n            if seconds == float('inf'):\n                return date.max\n            elif seconds == float('-inf'):\n                return date.min\n            else:\n                return seconds\n\nNote: 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 ","public_affected_ranges":[">= 1.8, < 1.8.2"]},{"certainty":"source_listed","source_ids":["sr-4b37fde72cd94db200add31f88805358"],"technology":"pydantic","known_exclusions":[],"conditions_summary":"Impact\n\nPassing 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).\nPatches\n\nPydantic is be patched with fixes available in the following versions:\n\n    v1.8.2\n    v1.7.4\n    v1.6.2\n\nAll these versions are available on pypi, and will be available on conda-forge soon.\n\nSee the changelog for details.\nWorkarounds\n\nIf you absolutely can't upgrade, you can work around this risk using a validator to catch these values, brief demo:\n\nfrom datetime import date\nfrom pydantic import BaseModel, validator\n\nclass DemoModel(BaseModel):\n    date_of_birth: date\n\n    @validator('date_of_birth', pre=True)\n    def skip_infinite_values(cls, v):\n        try:\n            seconds = float(v)\n        except (ValueError, TypeError):\n            return v\n        else:\n            if seconds == float('inf'):\n                return date.max\n            elif seconds == float('-inf'):\n                return date.min\n            else:\n                return seconds\n\nNote: 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 ","public_affected_ranges":[">= 1.7, < 1.7.4"]}],"null_published_at":"2026-11-07T07:07:39.867Z","source_updated_at":"2026-06-09T13:01:02.000Z","source_disclosed_at":"2021-05-13T20:23:17.000Z","is_synthetic_fixture":false,"null_last_reviewed_at":null,"public_change_summary":"First indexed by Null; source disclosure date is shown separately.","null_first_observed_at":"2026-11-06T15:13:31.161Z"}],"next_cursor":null,"snapshot_revision":"42594"}