LiveActive security incident?Get immediate response
CVE Record

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.

LowCVSS 3.3Not KEV-listedUpdated
Glexia's TakeAutomated analysislow

Security readout for executives and security teams

Plain-English summary

CVE-2021-29510 is a denial-of-service bug in Pydantic. Certain infinity-style values supplied to date or datetime validation can make validation run indefinitely, consuming one CPU core. The business impact is service degradation where vulnerable Pydantic versions process untrusted or external date data.

Executive priority

Treat as low severity but operationally relevant for internet-facing or high-throughput Python services. Patch through normal dependency maintenance, accelerating where vulnerable date validation is exposed to external input.

Technical view

Affected Pydantic versions can enter an infinite loop when validating infinity-like inputs for date or datetime fields. The issue maps to CWE-835 and has CVSS 3.1 score 3.3. Fixed releases are v1.8.2, v1.7.4, and v1.6.2, with a validator workaround described as inferior to upgrading.

Likely exposure

Exposure is most likely in Python applications using Pydantic versions >=1.8.0 <1.8.2, >=1.7.0 <1.7.4, or <1.6.2, especially where date or datetime fields consume external data.

Exploitation context

The provided sources do not show CISA KEV listing, active exploitation, or exploit availability. Practical impact is availability loss: a crafted value reaching vulnerable validation can pin one CPU core in an infinite loop.

Researcher notes

The core condition is an infinite loop during date or datetime validation in vulnerable Pydantic branches. Sources identify fixed versions and a workaround, but do not provide evidence of active exploitation or broader affected products beyond Pydantic and downstream Fedora packaging.

Mitigation direction

  • Upgrade Pydantic to v1.8.2, v1.7.4, v1.6.2, or later fixed guidance.
  • Prioritize services parsing external date or datetime data through Pydantic models.
  • Use vendor-recommended validators only as a temporary workaround when upgrading is impossible.
  • Request vendor backport guidance if pinned to an older unsupported Pydantic branch.
  • Track downstream package advisories, including Fedora updates where relevant.

Validation and detection

  • Review dependency manifests, lockfiles, and SBOMs for affected Pydantic versions.
  • Confirm runtime package versions in deployed Python environments and containers.
  • Inventory Pydantic models with date or datetime fields fed by external data.
  • Check whether patched package versions are present in build artifacts.
  • Verify regression coverage for rejected invalid date and datetime inputs.
Prepared
Confidence
high
Sources
7

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-835: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2021-29510 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Low
CVSS
3.3 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
6Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
3.3CVSS 3.1LowCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L1.81.4Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

3.3Low
CVSS 3.1 vector shape for CVE-2021-29510Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Source materials

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
samuelcolvinpydantic>= 1.8.0, < 1.8.2, >= 1.7.0, < 1.7.4, < 1.6.2Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-835 · source CWE mapping

Loop with Unreachable Exit Condition ('Infinite Loop')

Loop with Unreachable Exit Condition ('Infinite Loop') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.