CVE-2026-133421

NameCVE-2026-133421
DescriptionValidating 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.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
pydantic (PTS)bookworm1.10.4-1+deb12u1vulnerable
trixie2.10.6-2fixed
forky, sid2.14.1-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
pydanticsource(unstable)2.4.2-1

Notes

https://github.com/pydantic/pydantic/security/advisories/GHSA-jfv7-ghgv-gx4x
https://github.com/pydantic/pydantic/commit/62791e66a9f8f118e465ed760c9e2ede9ae3055e (v1.10.27)

Search for package or bug name: Reporting problems