All vulnerabilities

PyPI

CVE-2026-133421

Quadratic time timedelta validation in Pydantic V1

Severity
Medium 6.9
Published
20 Nov 2026
Last changed
20 Nov 2026
Added to UpHeron
23 Nov 2026
Exploit chance
0.8% in the next 30 daysHigher than 58% of CVEs. EPSS by FIRST, 24 Nov 2026
Weakness
Regular expression denial of service (ReDoS) (CWE-1333)
Attack
Over the network · No login needed · No user action needed
Attacker can
Slow it down
CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
Sources
CVE Program

Description

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 iso8601_duration_re regular expression used to parse ISO 8601 durations (in pydantic/datetime_parse.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.

From the CVE Program.

Affected software

SoftwareAffected versions
pydanticPyPI · osv:PyPI:pydantic
  • Every version up to 1.10.26

About pydantic

Weekly downloads (PyPI)
288,782,721PyPI Stats, 23 Nov 2026

References

  • CVE.org https://www.cve.org/CVERecord?id=CVE-2026-133421