CVE-2026-133421: Quadratic time timedelta validation in Pydantic V1

Published Nov 20, 2026
·
Updated

Validating an untrusted ISO 8601 duration string into a timedelta field with Pydantic V1 takes quadratic time: an input of a few dozen kilobytes takes seconds to validate.

The iso8601durationre regular expression used to parse ISO 8601 durations (in pydantic/datetimeparse.py) contains an unescaped ".", which also matches digits. On a string of digits, the repeated groups overlap and the regex engine backtracks in quadratic time.

The issue was fixed in commit 62791e66a9f8f118e465ed760c9e2ede9ae3055e. Users relying on the pydantic.v1 namespace in Pydantic V2 should upgrade to 2.14.2 or later.

Impact: denial of service through validation of untrusted input. Affected are applications validating untrusted strings into timedelta fields.

Affected Software

1 affected component
pypi/pydantic<2.14.2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pydantic to a version that resolves this vulnerability.

    Patch 62791e66a9f8f118e465ed760c9e2ede9ae3055e
  2. Upgrade

    Upgrade pydantic to a version that resolves this vulnerability.

    Fixed in 2.14.2

Event History

Nov 20, 2026
CVE Published
via MITRE·07:33 AM
Data Sourced
via MITRE·07:33 AM
DescriptionWeakness
Data Sourced
via OSV·07:33 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·08:18 AM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are exposed to this denial-of-service issue?

Applications are affected when they validate untrusted strings into timedelta fields using Pydantic V1. This also includes applications using the pydantic.v1 namespace in Pydantic V2.

2

What does an attacker need to exploit it?

An attacker needs to submit a crafted ISO 8601 duration value where it is processed as an untrusted timedelta field. A digits-only input can trigger quadratic regular-expression backtracking, and inputs of a few dozen kilobytes can take seconds to validate.

3

What should teams using the Pydantic V1 compatibility namespace do?

Upgrade to Pydantic 2.14.2 or later when relying on the pydantic.v1 namespace. The fix is in commit 62791e66a9f8f118e465ed760c9e2ede9ae3055e.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203